@Only-api
@Post
@Get
@Delete
@MedicationStatement
Feature: Intrathecal resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific MedicationStatement node. This resource is part of the Chemotherapy.
File name: xaj.feature
Relative path: api/xaj.feature
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:03.430 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:04.053 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:04.053 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OKfEsxWpXJmJbptL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15208/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15208/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:04.053 [print] {
"resourceType": "MedicationStatement",
"id": "15208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:08.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:04.053 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:04.053 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:04.053 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OKfEsxWpXJmJbptL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15208/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15208/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:04.053 [print] {
"resourceType": "MedicationStatement",
"id": "15208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:08.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:04.053 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:04.668 [print] {
"resourceType": "MedicationStatement",
"id": "15208",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:08.777+02:00",
"source": "#OKfEsxWpXJmJbptL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:05.315 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:05.947 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:10.016+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:10.016+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:05.947 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:06.539 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:06.539 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uyWKPpvbcN4R8FMX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15209/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15209/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:06.539 [print] {
"resourceType": "MedicationStatement",
"id": "15209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:11.274+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:06.539 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:06.539 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:06.539 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uyWKPpvbcN4R8FMX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15209/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15209/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:06.539 [print] {
"resourceType": "MedicationStatement",
"id": "15209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:11.274+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:06.539 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:07.134 [print] {
"resourceType": "MedicationStatement",
"id": "15209",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:11.274+02:00",
"source": "#uyWKPpvbcN4R8FMX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:07.768 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:08.417 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:12.494+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:12.494+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:08.419 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:09.051 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:09.051 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q2Gh6t2QS2EcC3kD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15210/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15210/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:09.051 [print] {
"resourceType": "MedicationStatement",
"id": "15210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:13.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:09.051 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:09.051 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:09.051 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q2Gh6t2QS2EcC3kD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15210/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15210/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:09.051 [print] {
"resourceType": "MedicationStatement",
"id": "15210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:13.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:09.051 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:09.633 [print] {
"resourceType": "MedicationStatement",
"id": "15210",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:13.777+02:00",
"source": "#Q2Gh6t2QS2EcC3kD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:10.233 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:10.817 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:14.954+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:14.954+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:10.817 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:11.403 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:11.403 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tBW4bLcygUk3CG02"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15211/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15211/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:11.403 [print] {
"resourceType": "MedicationStatement",
"id": "15211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:16.130+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:11.403 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:11.403 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:11.403 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tBW4bLcygUk3CG02"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15211/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15211/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:11.403 [print] {
"resourceType": "MedicationStatement",
"id": "15211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:16.130+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:11.403 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:11.980 [print] {
"resourceType": "MedicationStatement",
"id": "15211",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:16.130+02:00",
"source": "#tBW4bLcygUk3CG02",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:12.600 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:13.173 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:17.327+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:17.327+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:13.173 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:13.821 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:13.821 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M6OL8qm5sCKpUcT7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15212/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15212/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:13.821 [print] {
"resourceType": "MedicationStatement",
"id": "15212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:18.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:13.821 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:13.821 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:13.821 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M6OL8qm5sCKpUcT7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15212/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15212/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:13.821 [print] {
"resourceType": "MedicationStatement",
"id": "15212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:18.530+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:13.821 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:14.424 [print] {
"resourceType": "MedicationStatement",
"id": "15212",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:18.530+02:00",
"source": "#M6OL8qm5sCKpUcT7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:15.079 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:15.703 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:19.810+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:19.810+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:15.703 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:16.319 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:16.319 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UWOinmoL7oFVajyr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15213/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15213/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:16.319 [print] {
"resourceType": "MedicationStatement",
"id": "15213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:21.043+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:16.319 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:16.322 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:16.322 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UWOinmoL7oFVajyr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15213/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15213/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:16.322 [print] {
"resourceType": "MedicationStatement",
"id": "15213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:21.043+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:16.322 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:16.893 [print] {
"resourceType": "MedicationStatement",
"id": "15213",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:21.043+02:00",
"source": "#UWOinmoL7oFVajyr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:17.745 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:18.319 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:22.473+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:22.473+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:18.319 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:18.913 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:18.913 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C12sEq1FmlE0Zzwo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15214/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15214/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:18.913 [print] {
"resourceType": "MedicationStatement",
"id": "15214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:23.645+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:18.913 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:18.913 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:18.913 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C12sEq1FmlE0Zzwo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15214/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15214/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:18.913 [print] {
"resourceType": "MedicationStatement",
"id": "15214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:23.645+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:18.913 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:19.615 [print] {
"resourceType": "MedicationStatement",
"id": "15214",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:23.645+02:00",
"source": "#C12sEq1FmlE0Zzwo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:21.351 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:21.952 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:26.086+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:26.086+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:21.968 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:23.190 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:23.190 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Eux4EBsqqoCRLDWc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15215/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15215/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:23.190 [print] {
"resourceType": "MedicationStatement",
"id": "15215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:27.917+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:23.190 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:23.192 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:23.192 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Eux4EBsqqoCRLDWc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15215/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15215/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:23.192 [print] {
"resourceType": "MedicationStatement",
"id": "15215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:27.917+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:23.192 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:23.754 [print] {
"resourceType": "MedicationStatement",
"id": "15215",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:27.917+02:00",
"source": "#Eux4EBsqqoCRLDWc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:24.349 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:24.966 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:29.074+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:29.074+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:24.966 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:25.567 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:25.567 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JcZ4SpeYcfOuIeHb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15216/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15216/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:25.567 [print] {
"resourceType": "MedicationStatement",
"id": "15216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:30.299+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:25.567 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:25.567 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:25.567 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JcZ4SpeYcfOuIeHb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15216/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15216/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:25.567 [print] {
"resourceType": "MedicationStatement",
"id": "15216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:30.299+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:25.567 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:26.190 [print] {
"resourceType": "MedicationStatement",
"id": "15216",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:30.299+02:00",
"source": "#JcZ4SpeYcfOuIeHb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:26.824 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:27.399 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:31.554+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:31.554+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:27.399 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:28.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:28.290 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MeET7QqoSK3KBP4Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15217/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15217/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:28.290 [print] {
"resourceType": "MedicationStatement",
"id": "15217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:33.026+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:28.290 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:28.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:28.305 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MeET7QqoSK3KBP4Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15217/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15217/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:28.305 [print] {
"resourceType": "MedicationStatement",
"id": "15217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:33.026+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:28.305 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:28.913 [print] {
"resourceType": "MedicationStatement",
"id": "15217",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:33.026+02:00",
"source": "#MeET7QqoSK3KBP4Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:29.565 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:30.439 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:34.280+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:34.280+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:30.439 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:31.059 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:31.059 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l710xE1L4xLIPiXf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15218/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15218/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:31.059 [print] {
"resourceType": "MedicationStatement",
"id": "15218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:35.792+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:31.059 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:31.059 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:31.059 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"l710xE1L4xLIPiXf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15218/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15218/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:31.059 [print] {
"resourceType": "MedicationStatement",
"id": "15218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:35.792+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:31.059 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:31.883 [print] {
"resourceType": "MedicationStatement",
"id": "15218",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:35.792+02:00",
"source": "#l710xE1L4xLIPiXf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:32.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:33.086 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:37.201+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:37.201+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:33.086 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:33.703 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:33.703 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DiOethvrryn6Zlg9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15219/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15219/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:33.703 [print] {
"resourceType": "MedicationStatement",
"id": "15219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:38.427+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:33.703 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:33.703 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:33.703 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DiOethvrryn6Zlg9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15219/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15219/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:33.703 [print] {
"resourceType": "MedicationStatement",
"id": "15219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:38.427+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:33.703 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:34.337 [print] {
"resourceType": "MedicationStatement",
"id": "15219",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:38.427+02:00",
"source": "#DiOethvrryn6Zlg9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:34.939 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:35.567 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:39.662+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:39.662+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:35.567 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:36.284 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:36.284 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9FOPVIh1LQLSCpP9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15220/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15220/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:36.284 [print] {
"resourceType": "MedicationStatement",
"id": "15220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:41.015+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:36.284 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:36.284 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:36.284 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9FOPVIh1LQLSCpP9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15220/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15220/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:36.284 [print] {
"resourceType": "MedicationStatement",
"id": "15220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:41.015+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:36.284 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:36.856 [print] {
"resourceType": "MedicationStatement",
"id": "15220",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:41.015+02:00",
"source": "#9FOPVIh1LQLSCpP9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:37.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:38.031 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:42.187+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:42.187+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:38.031 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:38.600 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:38.600 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m1eWEOiigJbq3xja"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15221/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15221/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:38.600 [print] {
"resourceType": "MedicationStatement",
"id": "15221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:43.326+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:38.600 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:38.600 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:38.600 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m1eWEOiigJbq3xja"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15221/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15221/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:38.600 [print] {
"resourceType": "MedicationStatement",
"id": "15221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:43.326+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:38.600 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:39.217 [print] {
"resourceType": "MedicationStatement",
"id": "15221",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:43.326+02:00",
"source": "#m1eWEOiigJbq3xja",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:39.822 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:40.432 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:44.555+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:44.555+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:40.447 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:41.064 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:41.064 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rPIHlS0IW4QEvoTq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15222/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15222/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:41.064 [print] {
"resourceType": "MedicationStatement",
"id": "15222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:45.775+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:41.064 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:41.064 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:41.064 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rPIHlS0IW4QEvoTq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15222/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15222/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:41.064 [print] {
"resourceType": "MedicationStatement",
"id": "15222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:45.775+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:41.064 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:41.633 [print] {
"resourceType": "MedicationStatement",
"id": "15222",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:45.775+02:00",
"source": "#rPIHlS0IW4QEvoTq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:42.226 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:42.875 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:46.956+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:46.956+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:42.875 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:43.462 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:43.462 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4Ux2jBkUqoVYimLg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15223/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15223/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:43.462 [print] {
"resourceType": "MedicationStatement",
"id": "15223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:48.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:43.462 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:43.464 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:43.464 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4Ux2jBkUqoVYimLg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15223/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15223/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:43.464 [print] {
"resourceType": "MedicationStatement",
"id": "15223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:48.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:43.464 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:44.070 [print] {
"resourceType": "MedicationStatement",
"id": "15223",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:48.187+02:00",
"source": "#4Ux2jBkUqoVYimLg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:44.701 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:45.576 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:49.422+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:49.422+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:45.577 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:46.231 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:46.231 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"STlCfAdd1w9E8uee"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15224/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15224/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:46.231 [print] {
"resourceType": "MedicationStatement",
"id": "15224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:50.950+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:46.232 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:46.233 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:46.233 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"STlCfAdd1w9E8uee"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15224/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15224/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:46.233 [print] {
"resourceType": "MedicationStatement",
"id": "15224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:50.950+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:46.233 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:46.811 [print] {
"resourceType": "MedicationStatement",
"id": "15224",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:50.950+02:00",
"source": "#STlCfAdd1w9E8uee",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:47.402 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 14ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 14ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:48.025 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:52.127+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:52.127+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:48.025 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:48.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:48.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C7fQwgljnsYnjgG9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15225/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15225/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:48.604 [print] {
"resourceType": "MedicationStatement",
"id": "15225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:53.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:48.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:48.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:48.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"C7fQwgljnsYnjgG9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15225/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15225/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:48.604 [print] {
"resourceType": "MedicationStatement",
"id": "15225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:53.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:48.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:49.216 [print] {
"resourceType": "MedicationStatement",
"id": "15225",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:53.337+02:00",
"source": "#C7fQwgljnsYnjgG9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:49.796 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:50.452 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:54.534+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:54.534+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:50.452 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:51.116 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:51.116 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KuQdVJMQ0CWmSTn4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15226/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15226/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:51.116 [print] {
"resourceType": "MedicationStatement",
"id": "15226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:55.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:51.116 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:51.116 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:51.116 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KuQdVJMQ0CWmSTn4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15226/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15226/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:51.116 [print] {
"resourceType": "MedicationStatement",
"id": "15226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:55.806+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:51.116 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:51.754 [print] {
"resourceType": "MedicationStatement",
"id": "15226",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:55.806+02:00",
"source": "#KuQdVJMQ0CWmSTn4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:52.371 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:52.973 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:57.105+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:57.105+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:52.973 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:53.606 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:53.606 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kZEoL5n1Yn7J8eoS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15227/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15227/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:53.606 [print] {
"resourceType": "MedicationStatement",
"id": "15227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:58.333+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:53.606 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:53.606 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:53.606 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kZEoL5n1Yn7J8eoS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15227/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:40:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15227/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:40:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:53.606 [print] {
"resourceType": "MedicationStatement",
"id": "15227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:58.333+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:53.606 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:54.193 [print] {
"resourceType": "MedicationStatement",
"id": "15227",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:40:58.333+02:00",
"source": "#kZEoL5n1Yn7J8eoS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:54.779 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:55.368 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:40:59.518+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:40:59.518+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:55.368 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:55.953 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:55.953 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rGzxvcuoIBI3Tme3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15228/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15228/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:55.953 [print] {
"resourceType": "MedicationStatement",
"id": "15228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:00.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:55.953 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:55.953 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:55.953 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"rGzxvcuoIBI3Tme3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15228/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15228/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:55.953 [print] {
"resourceType": "MedicationStatement",
"id": "15228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:00.680+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:55.953 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:56.517 [print] {
"resourceType": "MedicationStatement",
"id": "15228",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:00.680+02:00",
"source": "#rGzxvcuoIBI3Tme3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:57.534 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:40:58.119 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:02.252+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:02.252+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:40:58.119 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:58.691 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:58.691 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4aZlExdsVI8kUq4k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15229/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15229/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:58.691 [print] {
"resourceType": "MedicationStatement",
"id": "15229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:03.418+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:58.691 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:40:58.691 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:40:58.691 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4aZlExdsVI8kUq4k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15229/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15229/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:40:58.691 [print] {
"resourceType": "MedicationStatement",
"id": "15229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:03.418+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:40:58.691 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:40:59.309 [print] {
"resourceType": "MedicationStatement",
"id": "15229",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:03.418+02:00",
"source": "#4aZlExdsVI8kUq4k",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:40:59.942 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:00.544 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:04.662+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:04.662+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:00.544 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:01.167 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:01.167 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DQq7GaZK9RZy9eNF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15230/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15230/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:01.167 [print] {
"resourceType": "MedicationStatement",
"id": "15230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:05.900+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:01.167 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:01.167 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:01.167 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DQq7GaZK9RZy9eNF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15230/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15230/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:01.167 [print] {
"resourceType": "MedicationStatement",
"id": "15230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:05.900+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:01.167 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:01.794 [print] {
"resourceType": "MedicationStatement",
"id": "15230",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:05.900+02:00",
"source": "#DQq7GaZK9RZy9eNF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:02.427 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 21ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 21ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:03.029 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:07.151+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:07.151+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:03.029 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:03.646 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:03.646 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XXWRNIPyIZHxTI1w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15231/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15231/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:03.646 [print] {
"resourceType": "MedicationStatement",
"id": "15231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:08.380+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:03.646 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:03.646 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:03.646 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XXWRNIPyIZHxTI1w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15231/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15231/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:03.646 [print] {
"resourceType": "MedicationStatement",
"id": "15231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:08.380+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:03.646 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:04.247 [print] {
"resourceType": "MedicationStatement",
"id": "15231",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:08.380+02:00",
"source": "#XXWRNIPyIZHxTI1w",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:04.848 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:05.418 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:09.566+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:09.566+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:05.434 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:06.019 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:06.019 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zeWwaFHb6gOZZfeW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15232/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15232/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:06.019 [print] {
"resourceType": "MedicationStatement",
"id": "15232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:10.752+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:06.019 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:06.019 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:06.019 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zeWwaFHb6gOZZfeW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15232/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15232/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:06.019 [print] {
"resourceType": "MedicationStatement",
"id": "15232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:10.752+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:06.019 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:06.636 [print] {
"resourceType": "MedicationStatement",
"id": "15232",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:10.752+02:00",
"source": "#zeWwaFHb6gOZZfeW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:08.271 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:08.861 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:12.991+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:12.991+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:08.877 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:09.435 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:09.435 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sDvHkSMysCnpKFeH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15233/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15233/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:09.435 [print] {
"resourceType": "MedicationStatement",
"id": "15233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:14.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:09.435 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:09.435 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:09.435 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sDvHkSMysCnpKFeH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15233/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15233/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:09.435 [print] {
"resourceType": "MedicationStatement",
"id": "15233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:14.172+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:09.435 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:10.052 [print] {
"resourceType": "MedicationStatement",
"id": "15233",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:14.172+02:00",
"source": "#sDvHkSMysCnpKFeH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:10.638 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:11.217 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:15.354+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:15.354+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:11.217 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:11.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:11.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3khprKmkUq9h6G15"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15234/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15234/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:11.819 [print] {
"resourceType": "MedicationStatement",
"id": "15234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:16.545+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:11.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:11.822 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:11.823 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3khprKmkUq9h6G15"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15234/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15234/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:11.823 [print] {
"resourceType": "MedicationStatement",
"id": "15234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:16.545+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:11.823 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:12.422 [print] {
"resourceType": "MedicationStatement",
"id": "15234",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:16.545+02:00",
"source": "#3khprKmkUq9h6G15",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:13.030 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:13.650 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:17.758+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:17.758+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:13.651 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:14.508 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:14.508 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0jheZu1Oqvh7XbM8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15235/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15235/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:14.508 [print] {
"resourceType": "MedicationStatement",
"id": "15235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:19.235+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:14.508 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:14.509 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:14.509 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0jheZu1Oqvh7XbM8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15235/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15235/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:14.510 [print] {
"resourceType": "MedicationStatement",
"id": "15235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:19.235+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:14.513 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:16.122 [print] {
"resourceType": "MedicationStatement",
"id": "15235",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:19.235+02:00",
"source": "#0jheZu1Oqvh7XbM8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:16.740 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:17.321 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:21.477+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:21.477+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:17.321 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:17.948 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:17.948 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vCH99wyPJTS0GjJf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15236/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15236/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:17.948 [print] {
"resourceType": "MedicationStatement",
"id": "15236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:22.665+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:17.948 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:17.948 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:17.948 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vCH99wyPJTS0GjJf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15236/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15236/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:17.948 [print] {
"resourceType": "MedicationStatement",
"id": "15236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:22.665+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:17.948 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:18.568 [print] {
"resourceType": "MedicationStatement",
"id": "15236",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:22.665+02:00",
"source": "#vCH99wyPJTS0GjJf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:19.216 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:19.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:23.954+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:23.954+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:19.840 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:20.879 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:20.879 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O61amXm8RVX9uCWa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15237/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15237/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:20.879 [print] {
"resourceType": "MedicationStatement",
"id": "15237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:25.600+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:20.879 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:20.879 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:20.879 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"O61amXm8RVX9uCWa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15237/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15237/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:20.879 [print] {
"resourceType": "MedicationStatement",
"id": "15237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:25.600+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:20.879 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:21.456 [print] {
"resourceType": "MedicationStatement",
"id": "15237",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:25.600+02:00",
"source": "#O61amXm8RVX9uCWa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:22.062 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:22.665 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:26.800+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:26.800+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:22.667 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:23.246 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:23.246 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oLcDYNRofK9SkK62"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15238/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15238/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:23.246 [print] {
"resourceType": "MedicationStatement",
"id": "15238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:27.980+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:23.246 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:23.246 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:23.246 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oLcDYNRofK9SkK62"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15238/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15238/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:23.246 [print] {
"resourceType": "MedicationStatement",
"id": "15238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:27.980+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:23.246 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:23.849 [print] {
"resourceType": "MedicationStatement",
"id": "15238",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:27.980+02:00",
"source": "#oLcDYNRofK9SkK62",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:24.535 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:25.146 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:29.270+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:29.270+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:25.146 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:25.936 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:25.936 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ky7236MjnFy9uoCZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15239/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15239/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:25.936 [print] {
"resourceType": "MedicationStatement",
"id": "15239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:30.468+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:25.936 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:25.936 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:25.936 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Ky7236MjnFy9uoCZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15239/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15239/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:25.936 [print] {
"resourceType": "MedicationStatement",
"id": "15239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:30.468+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:25.936 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:26.520 [print] {
"resourceType": "MedicationStatement",
"id": "15239",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:30.468+02:00",
"source": "#Ky7236MjnFy9uoCZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:27.142 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:27.763 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:31.879+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:31.879+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:27.763 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:28.353 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:28.353 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hztZ4fPItqgSaA7K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15240/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15240/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:28.353 [print] {
"resourceType": "MedicationStatement",
"id": "15240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:33.073+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:28.353 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:28.353 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:28.353 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hztZ4fPItqgSaA7K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15240/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15240/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:28.353 [print] {
"resourceType": "MedicationStatement",
"id": "15240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:33.073+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:28.353 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:28.972 [print] {
"resourceType": "MedicationStatement",
"id": "15240",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:33.073+02:00",
"source": "#hztZ4fPItqgSaA7K",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:29.591 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:30.193 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:34.319+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:34.319+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:30.194 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:30.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:30.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ggJEoVf55qT1oq4I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15241/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15241/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:30.831 [print] {
"resourceType": "MedicationStatement",
"id": "15241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:35.561+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:30.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:30.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:30.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ggJEoVf55qT1oq4I"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15241/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15241/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:30.831 [print] {
"resourceType": "MedicationStatement",
"id": "15241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:35.561+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:30.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:31.406 [print] {
"resourceType": "MedicationStatement",
"id": "15241",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:35.561+02:00",
"source": "#ggJEoVf55qT1oq4I",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:32.046 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:32.648 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:36.777+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:36.777+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:32.648 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:33.298 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:33.298 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I8YWTwL0Cx6vTTd1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15242/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15242/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:33.298 [print] {
"resourceType": "MedicationStatement",
"id": "15242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:38.023+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:33.298 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:33.300 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:33.300 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I8YWTwL0Cx6vTTd1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15242/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15242/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:33.300 [print] {
"resourceType": "MedicationStatement",
"id": "15242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:38.023+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:33.300 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:33.910 [print] {
"resourceType": "MedicationStatement",
"id": "15242",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:38.023+02:00",
"source": "#I8YWTwL0Cx6vTTd1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:34.505 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:35.068 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:39.224+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:39.224+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:35.068 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:35.933 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:35.933 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0JoTnjFPlBbKOyY3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15243/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15243/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:35.933 [print] {
"resourceType": "MedicationStatement",
"id": "15243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:40.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:35.933 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:35.934 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:35.934 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0JoTnjFPlBbKOyY3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15243/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15243/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:35.934 [print] {
"resourceType": "MedicationStatement",
"id": "15243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:40.635+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:35.935 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:36.522 [print] {
"resourceType": "MedicationStatement",
"id": "15243",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:40.635+02:00",
"source": "#0JoTnjFPlBbKOyY3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:37.149 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:37.727 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:41.878+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:41.878+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:37.727 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:38.336 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:38.336 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6ow1xsSnkLOH44RD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15244/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15244/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:38.336 [print] {
"resourceType": "MedicationStatement",
"id": "15244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:43.068+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:38.336 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:38.336 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:38.336 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6ow1xsSnkLOH44RD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15244/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15244/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:38.336 [print] {
"resourceType": "MedicationStatement",
"id": "15244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:43.068+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:38.336 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:38.937 [print] {
"resourceType": "MedicationStatement",
"id": "15244",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:43.068+02:00",
"source": "#6ow1xsSnkLOH44RD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:39.816 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:40.470 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:44.547+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:44.547+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:40.470 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:41.092 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:41.092 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kK841dYFwcnDCUkb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15245/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15245/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:41.092 [print] {
"resourceType": "MedicationStatement",
"id": "15245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:45.821+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:41.092 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:41.092 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:41.092 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kK841dYFwcnDCUkb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15245/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15245/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:41.092 [print] {
"resourceType": "MedicationStatement",
"id": "15245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:45.821+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:41.092 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:41.698 [print] {
"resourceType": "MedicationStatement",
"id": "15245",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:45.821+02:00",
"source": "#kK841dYFwcnDCUkb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:42.455 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:43.044 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:47.177+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:47.177+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:43.044 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:43.684 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:43.684 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eVzFpTLVwxZFIxab"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15246/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15246/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:43.684 [print] {
"resourceType": "MedicationStatement",
"id": "15246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:48.404+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:43.684 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:43.684 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:43.684 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eVzFpTLVwxZFIxab"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15246/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15246/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:43.684 [print] {
"resourceType": "MedicationStatement",
"id": "15246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:48.404+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:43.684 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:44.335 [print] {
"resourceType": "MedicationStatement",
"id": "15246",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:48.404+02:00",
"source": "#eVzFpTLVwxZFIxab",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:44.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:45.718 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:49.661+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:49.661+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:45.734 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:46.301 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:46.301 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GFSYwQezKx1GPgCL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15247/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15247/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:46.301 [print] {
"resourceType": "MedicationStatement",
"id": "15247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:51.034+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:46.301 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:46.301 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:46.301 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GFSYwQezKx1GPgCL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15247/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15247/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:46.301 [print] {
"resourceType": "MedicationStatement",
"id": "15247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:51.034+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:46.301 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:47.173 [print] {
"resourceType": "MedicationStatement",
"id": "15247",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:51.034+02:00",
"source": "#GFSYwQezKx1GPgCL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:47.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:48.418 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:52.538+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:52.538+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:48.418 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:49.023 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:49.023 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N6LhfgYFQTCxT5n4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15248/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15248/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:49.023 [print] {
"resourceType": "MedicationStatement",
"id": "15248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:53.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:49.023 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:49.023 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:49.023 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"N6LhfgYFQTCxT5n4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15248/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15248/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:49.023 [print] {
"resourceType": "MedicationStatement",
"id": "15248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:53.756+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:49.023 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:49.680 [print] {
"resourceType": "MedicationStatement",
"id": "15248",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:53.756+02:00",
"source": "#N6LhfgYFQTCxT5n4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:50.281 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:50.892 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:55.007+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:55.007+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:50.893 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:51.462 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:51.462 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YPlFyAoeeULHVgRB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15249/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15249/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:51.462 [print] {
"resourceType": "MedicationStatement",
"id": "15249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:56.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:51.462 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:51.463 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:51.463 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YPlFyAoeeULHVgRB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15249/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15249/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:51.463 [print] {
"resourceType": "MedicationStatement",
"id": "15249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:56.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:51.463 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:52.085 [print] {
"resourceType": "MedicationStatement",
"id": "15249",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:56.186+02:00",
"source": "#YPlFyAoeeULHVgRB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:52.718 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:53.362 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:41:57.441+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:41:57.441+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:53.362 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:54.013 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:54.013 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FEZ8iTGfcRyJf3K9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15250/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15250/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:54.013 [print] {
"resourceType": "MedicationStatement",
"id": "15250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:58.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:54.013 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:54.013 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:54.013 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FEZ8iTGfcRyJf3K9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15250/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:41:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15250/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:41:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:54.013 [print] {
"resourceType": "MedicationStatement",
"id": "15250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:58.711+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:54.013 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:54.672 [print] {
"resourceType": "MedicationStatement",
"id": "15250",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:41:58.711+02:00",
"source": "#FEZ8iTGfcRyJf3K9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:55.339 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:55.983 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:00.059+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:00.059+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:55.983 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:56.612 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:56.612 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LWPkiWrTBvIEZ3cc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15251/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15251/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:56.612 [print] {
"resourceType": "MedicationStatement",
"id": "15251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:01.330+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:56.613 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:56.614 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:56.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LWPkiWrTBvIEZ3cc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15251/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15251/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:56.614 [print] {
"resourceType": "MedicationStatement",
"id": "15251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:01.330+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:56.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:57.403 [print] {
"resourceType": "MedicationStatement",
"id": "15251",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:01.330+02:00",
"source": "#LWPkiWrTBvIEZ3cc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:41:57.989 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:41:58.577 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:02.716+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:02.716+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:41:58.578 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:59.207 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:59.207 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CPvWV1lLlGzPghIX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15252/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15252/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:59.207 [print] {
"resourceType": "MedicationStatement",
"id": "15252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:03.917+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:59.207 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:41:59.209 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:41:59.209 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CPvWV1lLlGzPghIX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15252/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15252/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:41:59.209 [print] {
"resourceType": "MedicationStatement",
"id": "15252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:03.917+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:41:59.209 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:41:59.803 [print] {
"resourceType": "MedicationStatement",
"id": "15252",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:03.917+02:00",
"source": "#CPvWV1lLlGzPghIX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:00.403 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:01.147 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:05.123+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:05.123+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:01.163 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:02.028 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:02.028 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"T5ftW9ZQ7LgADk8M"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15253/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15253/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:02.028 [print] {
"resourceType": "MedicationStatement",
"id": "15253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:06.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:02.028 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:02.028 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:02.028 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"T5ftW9ZQ7LgADk8M"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15253/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15253/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:02.028 [print] {
"resourceType": "MedicationStatement",
"id": "15253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:06.757+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:02.028 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:02.646 [print] {
"resourceType": "MedicationStatement",
"id": "15253",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:06.757+02:00",
"source": "#T5ftW9ZQ7LgADk8M",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:03.247 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:03.894 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:07.984+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:07.984+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:03.894 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:04.516 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:04.516 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hn633NKODInyTDiW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15254/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15254/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:04.516 [print] {
"resourceType": "MedicationStatement",
"id": "15254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:09.244+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:04.516 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:04.532 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:04.532 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hn633NKODInyTDiW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15254/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15254/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:04.532 [print] {
"resourceType": "MedicationStatement",
"id": "15254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:09.244+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:04.532 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:05.151 [print] {
"resourceType": "MedicationStatement",
"id": "15254",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:09.244+02:00",
"source": "#hn633NKODInyTDiW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:05.759 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:06.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:10.470+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:10.470+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:06.397 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:07.011 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:07.011 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QyIhE5IQDRHJHweI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15255/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15255/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:07.011 [print] {
"resourceType": "MedicationStatement",
"id": "15255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:11.734+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:07.011 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:07.012 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:07.012 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QyIhE5IQDRHJHweI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15255/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15255/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:07.012 [print] {
"resourceType": "MedicationStatement",
"id": "15255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:11.734+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:07.012 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:07.793 [print] {
"resourceType": "MedicationStatement",
"id": "15255",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:11.734+02:00",
"source": "#QyIhE5IQDRHJHweI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:08.412 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:09.020 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:13.129+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:13.129+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:09.020 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:09.969 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:09.969 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e8ooQojC7YDFBWqI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15256/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15256/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:09.969 [print] {
"resourceType": "MedicationStatement",
"id": "15256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:14.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:09.969 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:09.969 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:09.969 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e8ooQojC7YDFBWqI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15256/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15256/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:09.969 [print] {
"resourceType": "MedicationStatement",
"id": "15256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:14.700+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:09.969 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:10.772 [print] {
"resourceType": "MedicationStatement",
"id": "15256",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:14.700+02:00",
"source": "#e8ooQojC7YDFBWqI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:11.745 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:12.364 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:16.446+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:16.446+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:12.364 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:13.048 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:13.048 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gCtiCgxoZkYjAfZu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15257/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15257/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:13.048 [print] {
"resourceType": "MedicationStatement",
"id": "15257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:17.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:13.048 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:13.048 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:13.048 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gCtiCgxoZkYjAfZu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15257/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15257/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:13.048 [print] {
"resourceType": "MedicationStatement",
"id": "15257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:17.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:13.048 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:13.635 [print] {
"resourceType": "MedicationStatement",
"id": "15257",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:17.777+02:00",
"source": "#gCtiCgxoZkYjAfZu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:14.869 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:15.540 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:19.606+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:19.606+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:15.541 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:16.123 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:16.123 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vBw1SM5Iiag4xWj9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15258/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15258/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:16.124 [print] {
"resourceType": "MedicationStatement",
"id": "15258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:20.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:16.124 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:16.125 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:16.125 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vBw1SM5Iiag4xWj9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15258/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15258/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:16.125 [print] {
"resourceType": "MedicationStatement",
"id": "15258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:20.852+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:16.125 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:16.694 [print] {
"resourceType": "MedicationStatement",
"id": "15258",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:20.852+02:00",
"source": "#vBw1SM5Iiag4xWj9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:17.347 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:17.953 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:22.063+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:22.063+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:17.954 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:18.523 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:18.523 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"85y6H8EupxxmezRl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15259/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15259/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:18.523 [print] {
"resourceType": "MedicationStatement",
"id": "15259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:23.246+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:18.523 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:18.524 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:18.524 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"85y6H8EupxxmezRl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15259/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15259/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:18.524 [print] {
"resourceType": "MedicationStatement",
"id": "15259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:23.246+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:18.524 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:19.114 [print] {
"resourceType": "MedicationStatement",
"id": "15259",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:23.246+02:00",
"source": "#85y6H8EupxxmezRl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:19.715 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:20.319 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:24.435+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:24.435+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:20.320 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:20.941 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:20.941 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i9CtDk8L11CsiTPx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15260/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15260/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:20.941 [print] {
"resourceType": "MedicationStatement",
"id": "15260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:25.665+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:20.941 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:20.942 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:20.942 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i9CtDk8L11CsiTPx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15260/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15260/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:20.942 [print] {
"resourceType": "MedicationStatement",
"id": "15260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:25.665+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:20.942 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:21.519 [print] {
"resourceType": "MedicationStatement",
"id": "15260",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:25.665+02:00",
"source": "#i9CtDk8L11CsiTPx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:22.369 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:22.933 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:27.096+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:27.096+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:22.934 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:23.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:23.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TeBOJGNnnDhFp7Yn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15261/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15261/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:23.549 [print] {
"resourceType": "MedicationStatement",
"id": "15261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:28.271+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:23.549 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:23.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:23.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TeBOJGNnnDhFp7Yn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15261/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15261/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:23.549 [print] {
"resourceType": "MedicationStatement",
"id": "15261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:28.271+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:23.549 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:24.439 [print] {
"resourceType": "MedicationStatement",
"id": "15261",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:28.271+02:00",
"source": "#TeBOJGNnnDhFp7Yn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:25.041 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:25.627 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:29.782+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:29.782+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:25.627 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:26.462 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:26.462 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"npuoezwGMfq975kO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15262/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15262/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:26.462 [print] {
"resourceType": "MedicationStatement",
"id": "15262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:31.196+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:26.462 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:26.462 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:26.462 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"npuoezwGMfq975kO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15262/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15262/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:26.462 [print] {
"resourceType": "MedicationStatement",
"id": "15262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:31.196+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:26.462 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:27.608 [print] {
"resourceType": "MedicationStatement",
"id": "15262",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:31.196+02:00",
"source": "#npuoezwGMfq975kO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:28.231 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:28.816 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:32.960+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:32.960+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:28.816 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:29.433 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:29.433 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Rk6l0bwsXBbq7bWm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15263/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15263/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:29.433 [print] {
"resourceType": "MedicationStatement",
"id": "15263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:34.151+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:29.433 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:29.433 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:29.433 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Rk6l0bwsXBbq7bWm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15263/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15263/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:29.433 [print] {
"resourceType": "MedicationStatement",
"id": "15263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:34.151+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:29.433 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:30.065 [print] {
"resourceType": "MedicationStatement",
"id": "15263",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:34.151+02:00",
"source": "#Rk6l0bwsXBbq7bWm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:30.698 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:31.299 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:35.438+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:35.438+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:31.299 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:32.273 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:32.273 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YqCHn6Rjzmp0Qfed"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15264/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15264/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:32.273 [print] {
"resourceType": "MedicationStatement",
"id": "15264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:37.008+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:32.273 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:32.273 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:32.273 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YqCHn6Rjzmp0Qfed"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15264/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15264/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:32.273 [print] {
"resourceType": "MedicationStatement",
"id": "15264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:37.008+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:32.273 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:32.859 [print] {
"resourceType": "MedicationStatement",
"id": "15264",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:37.008+02:00",
"source": "#YqCHn6Rjzmp0Qfed",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:33.478 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:35.081 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:38.208+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:38.208+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:35.081 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:36.050 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:36.050 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jY9xY8mPnrr7c5MB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15265/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15265/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:36.050 [print] {
"resourceType": "MedicationStatement",
"id": "15265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:40.776+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:36.050 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:36.050 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:36.050 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jY9xY8mPnrr7c5MB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15265/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15265/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:36.050 [print] {
"resourceType": "MedicationStatement",
"id": "15265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:40.776+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:36.050 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:36.668 [print] {
"resourceType": "MedicationStatement",
"id": "15265",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:40.776+02:00",
"source": "#jY9xY8mPnrr7c5MB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:37.316 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:37.957 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:42.038+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:42.038+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:37.957 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:38.626 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:38.626 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zl3tAjtjH30HRxnS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15266/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15266/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:38.626 [print] {
"resourceType": "MedicationStatement",
"id": "15266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:43.340+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:38.626 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:38.626 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:38.626 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zl3tAjtjH30HRxnS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15266/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15266/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:38.626 [print] {
"resourceType": "MedicationStatement",
"id": "15266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:43.340+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:38.626 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:39.235 [print] {
"resourceType": "MedicationStatement",
"id": "15266",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:43.340+02:00",
"source": "#zl3tAjtjH30HRxnS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:39.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:40.467 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:44.580+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:44.580+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:40.467 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:42.402 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:42.402 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BdtWBOjURVhbUvIP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15267/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15267/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:42.402 [print] {
"resourceType": "MedicationStatement",
"id": "15267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:47.129+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:42.402 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:42.402 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:42.402 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BdtWBOjURVhbUvIP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15267/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15267/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:42.402 [print] {
"resourceType": "MedicationStatement",
"id": "15267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:47.129+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:42.402 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:43.013 [print] {
"resourceType": "MedicationStatement",
"id": "15267",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:47.129+02:00",
"source": "#BdtWBOjURVhbUvIP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:43.618 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:44.637 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:48.357+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:48.357+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:44.652 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:45.492 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:45.492 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lgXJSKJRFqPcBSvn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15268/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15268/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:45.492 [print] {
"resourceType": "MedicationStatement",
"id": "15268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:50.224+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:45.492 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:45.492 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:45.492 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lgXJSKJRFqPcBSvn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15268/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15268/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:45.492 [print] {
"resourceType": "MedicationStatement",
"id": "15268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:50.224+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:45.492 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:46.128 [print] {
"resourceType": "MedicationStatement",
"id": "15268",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:50.224+02:00",
"source": "#lgXJSKJRFqPcBSvn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:46.698 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:47.316 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:51.440+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:51.440+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:47.316 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:48.998 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:48.998 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"95XRbdKEiajxvpCK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15269/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15269/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:48.998 [print] {
"resourceType": "MedicationStatement",
"id": "15269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:53.719+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:48.998 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:48.998 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:48.998 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"95XRbdKEiajxvpCK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15269/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15269/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:48.998 [print] {
"resourceType": "MedicationStatement",
"id": "15269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:53.719+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:48.998 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:49.606 [print] {
"resourceType": "MedicationStatement",
"id": "15269",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:53.719+02:00",
"source": "#95XRbdKEiajxvpCK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:50.239 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:50.809 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:54.965+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:54.965+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:50.809 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:51.442 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:51.442 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TAaiWwoNGnk9N5zK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15270/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15270/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:51.442 [print] {
"resourceType": "MedicationStatement",
"id": "15270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:56.169+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:51.442 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:51.442 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:51.442 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TAaiWwoNGnk9N5zK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15270/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15270/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:51.442 [print] {
"resourceType": "MedicationStatement",
"id": "15270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:56.169+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:51.442 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:52.028 [print] {
"resourceType": "MedicationStatement",
"id": "15270",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:56.169+02:00",
"source": "#TAaiWwoNGnk9N5zK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:52.861 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:53.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:42:57.585+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:42:57.585+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:53.447 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:54.319 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:54.319 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ySrpoxjQg3NoMz4K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15271/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15271/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:54.319 [print] {
"resourceType": "MedicationStatement",
"id": "15271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:59.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:54.319 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:54.319 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:54.319 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ySrpoxjQg3NoMz4K"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15271/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:42:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15271/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:42:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:54.319 [print] {
"resourceType": "MedicationStatement",
"id": "15271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:59.049+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:54.319 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:54.921 [print] {
"resourceType": "MedicationStatement",
"id": "15271",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:42:59.049+02:00",
"source": "#ySrpoxjQg3NoMz4K",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:55.523 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:56.171 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:00.261+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:00.261+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:56.171 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:57.275 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:57.275 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vYYBk0WoRrXW6P21"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15272/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15272/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:57.275 [print] {
"resourceType": "MedicationStatement",
"id": "15272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:01.982+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:57.275 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:42:57.275 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:42:57.275 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vYYBk0WoRrXW6P21"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15272/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15272/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:42:57.275 [print] {
"resourceType": "MedicationStatement",
"id": "15272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:01.982+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:42:57.275 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:42:57.933 [print] {
"resourceType": "MedicationStatement",
"id": "15272",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:01.982+02:00",
"source": "#vYYBk0WoRrXW6P21",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:42:58.767 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:42:59.453 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:03.501+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:03.501+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:42:59.453 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:01.159 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:01.159 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LfruZCn1baNYrJ41"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15273/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15273/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:01.159 [print] {
"resourceType": "MedicationStatement",
"id": "15273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:05.882+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:01.159 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:01.159 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:01.159 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LfruZCn1baNYrJ41"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15273/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15273/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:01.159 [print] {
"resourceType": "MedicationStatement",
"id": "15273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:05.882+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:01.159 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:02.802 [print] {
"resourceType": "MedicationStatement",
"id": "15273",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:05.882+02:00",
"source": "#LfruZCn1baNYrJ41",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:03.492 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:05.080 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:08.214+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:08.214+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:05.096 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:05.697 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:05.697 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ctnFi5zqBgzD5CaS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15274/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15274/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:05.697 [print] {
"resourceType": "MedicationStatement",
"id": "15274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:10.439+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:05.697 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:05.712 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:05.712 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ctnFi5zqBgzD5CaS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15274/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15274/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:05.712 [print] {
"resourceType": "MedicationStatement",
"id": "15274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:10.439+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:05.712 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:06.552 [print] {
"resourceType": "MedicationStatement",
"id": "15274",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:10.439+02:00",
"source": "#ctnFi5zqBgzD5CaS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:07.173 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:07.822 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:11.915+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:11.915+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:07.822 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:08.580 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:08.580 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BSHR7ZS1fpr8DiaK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15275/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15275/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:08.580 [print] {
"resourceType": "MedicationStatement",
"id": "15275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:13.308+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:08.580 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:08.580 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:08.580 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BSHR7ZS1fpr8DiaK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15275/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15275/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:08.580 [print] {
"resourceType": "MedicationStatement",
"id": "15275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:13.308+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:08.580 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:09.227 [print] {
"resourceType": "MedicationStatement",
"id": "15275",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:13.308+02:00",
"source": "#BSHR7ZS1fpr8DiaK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:09.929 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:10.568 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:14.655+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:14.655+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:10.568 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:12.527 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:12.527 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FBv624C920QsmHbj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15276/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15276/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:12.527 [print] {
"resourceType": "MedicationStatement",
"id": "15276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:17.260+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:12.527 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:12.527 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:12.527 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FBv624C920QsmHbj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15276/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15276/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:12.527 [print] {
"resourceType": "MedicationStatement",
"id": "15276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:17.260+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:12.527 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:13.180 [print] {
"resourceType": "MedicationStatement",
"id": "15276",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:17.260+02:00",
"source": "#FBv624C920QsmHbj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:13.812 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:14.413 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:18.542+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:18.542+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:14.413 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:15.045 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:15.045 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"372EujqO0xQKbK5b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15277/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15277/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:15.045 [print] {
"resourceType": "MedicationStatement",
"id": "15277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:19.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:15.045 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:15.045 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:15.045 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"372EujqO0xQKbK5b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15277/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15277/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:15.045 [print] {
"resourceType": "MedicationStatement",
"id": "15277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:19.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:15.045 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:15.662 [print] {
"resourceType": "MedicationStatement",
"id": "15277",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:19.777+02:00",
"source": "#372EujqO0xQKbK5b",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:16.274 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:16.892 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:21.003+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:21.003+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:16.892 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:17.509 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:17.509 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YiMCp2Keiv6M5KAm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15278/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15278/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:17.509 [print] {
"resourceType": "MedicationStatement",
"id": "15278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:22.238+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:17.509 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:17.509 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:17.509 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YiMCp2Keiv6M5KAm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15278/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15278/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:17.509 [print] {
"resourceType": "MedicationStatement",
"id": "15278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:22.238+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:17.509 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:18.342 [print] {
"resourceType": "MedicationStatement",
"id": "15278",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:22.238+02:00",
"source": "#YiMCp2Keiv6M5KAm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:18.974 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:19.796 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:23.704+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:23.704+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:19.796 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:20.396 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:20.396 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fOVN4SeYLCTwl5c0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15279/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15279/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:20.396 [print] {
"resourceType": "MedicationStatement",
"id": "15279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:25.128+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:20.396 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:20.396 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:20.396 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fOVN4SeYLCTwl5c0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15279/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15279/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:20.396 [print] {
"resourceType": "MedicationStatement",
"id": "15279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:25.128+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:20.396 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:21.019 [print] {
"resourceType": "MedicationStatement",
"id": "15279",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:25.128+02:00",
"source": "#fOVN4SeYLCTwl5c0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:21.699 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:23.470 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:26.418+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:26.418+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:23.470 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:24.056 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:24.056 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e7wh7JJx0BcZ1aEd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15280/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15280/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:24.056 [print] {
"resourceType": "MedicationStatement",
"id": "15280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:28.794+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:24.056 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:24.056 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:24.056 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"e7wh7JJx0BcZ1aEd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15280/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15280/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:24.056 [print] {
"resourceType": "MedicationStatement",
"id": "15280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:28.794+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:24.056 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:24.694 [print] {
"resourceType": "MedicationStatement",
"id": "15280",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:28.794+02:00",
"source": "#e7wh7JJx0BcZ1aEd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:25.294 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:25.891 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:30.000+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:30.000+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:25.895 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:26.514 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:26.514 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KyvDfsURxdkSGkZ0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15281/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15281/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:26.514 [print] {
"resourceType": "MedicationStatement",
"id": "15281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:31.243+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:26.514 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:26.516 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:26.516 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KyvDfsURxdkSGkZ0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15281/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15281/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:26.516 [print] {
"resourceType": "MedicationStatement",
"id": "15281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:31.243+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:26.516 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:27.088 [print] {
"resourceType": "MedicationStatement",
"id": "15281",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:31.243+02:00",
"source": "#KyvDfsURxdkSGkZ0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:27.677 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:28.298 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:32.409+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:32.409+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:28.298 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:28.892 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:28.892 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BfUtFTbZ7gap6HUU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15282/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15282/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:28.892 [print] {
"resourceType": "MedicationStatement",
"id": "15282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:33.623+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:28.892 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:28.892 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:28.892 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BfUtFTbZ7gap6HUU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15282/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15282/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:28.892 [print] {
"resourceType": "MedicationStatement",
"id": "15282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:33.623+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:28.892 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:29.467 [print] {
"resourceType": "MedicationStatement",
"id": "15282",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:33.623+02:00",
"source": "#BfUtFTbZ7gap6HUU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:30.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:30.663 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:34.821+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:34.821+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:30.669 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:31.257 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:31.257 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nIuRtFtvFgeGSP3c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15283/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15283/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:31.257 [print] {
"resourceType": "MedicationStatement",
"id": "15283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:35.993+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:31.257 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:31.257 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:31.257 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"nIuRtFtvFgeGSP3c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15283/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15283/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:31.257 [print] {
"resourceType": "MedicationStatement",
"id": "15283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:35.993+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:31.257 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:31.872 [print] {
"resourceType": "MedicationStatement",
"id": "15283",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:35.993+02:00",
"source": "#nIuRtFtvFgeGSP3c",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:32.466 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:33.092 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:37.195+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:37.195+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:33.092 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:33.756 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:33.756 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J5RKrYimiryIkXrz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15284/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15284/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:33.756 [print] {
"resourceType": "MedicationStatement",
"id": "15284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:38.497+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:33.756 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:33.756 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:33.756 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"J5RKrYimiryIkXrz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15284/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15284/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:33.756 [print] {
"resourceType": "MedicationStatement",
"id": "15284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:38.497+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:33.756 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:34.397 [print] {
"resourceType": "MedicationStatement",
"id": "15284",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:38.497+02:00",
"source": "#J5RKrYimiryIkXrz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:34.999 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:35.886 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:39.735+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:39.735+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:35.886 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:36.489 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:36.489 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"feunEKLlX42drQtW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15285/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15285/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:36.489 [print] {
"resourceType": "MedicationStatement",
"id": "15285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:41.218+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:36.489 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:36.489 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:36.489 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"feunEKLlX42drQtW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15285/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15285/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:36.489 [print] {
"resourceType": "MedicationStatement",
"id": "15285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:41.218+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:36.489 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:37.112 [print] {
"resourceType": "MedicationStatement",
"id": "15285",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:41.218+02:00",
"source": "#feunEKLlX42drQtW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:37.929 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:39.194 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:42.664+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:42.664+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:39.194 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:39.821 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:39.821 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wae7ctHQbIw5AkFy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15286/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15286/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:39.821 [print] {
"resourceType": "MedicationStatement",
"id": "15286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:44.546+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:39.821 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:39.821 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:39.821 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wae7ctHQbIw5AkFy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15286/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15286/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:39.821 [print] {
"resourceType": "MedicationStatement",
"id": "15286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:44.546+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:39.821 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:40.410 [print] {
"resourceType": "MedicationStatement",
"id": "15286",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:44.546+02:00",
"source": "#wae7ctHQbIw5AkFy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:41.059 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:41.661 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:45.785+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:45.785+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:41.661 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:42.247 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:42.247 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fIyAJ2QFOyeeTztS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15287/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15287/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:42.247 [print] {
"resourceType": "MedicationStatement",
"id": "15287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:46.972+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:42.247 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:42.247 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:42.247 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fIyAJ2QFOyeeTztS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15287/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15287/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:42.247 [print] {
"resourceType": "MedicationStatement",
"id": "15287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:46.972+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:42.247 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:42.864 [print] {
"resourceType": "MedicationStatement",
"id": "15287",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:46.972+02:00",
"source": "#fIyAJ2QFOyeeTztS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:43.441 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:44.059 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:48.182+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:48.182+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:44.059 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:44.644 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:44.644 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SnGXMX75sb45ZjwN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15288/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15288/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:44.644 [print] {
"resourceType": "MedicationStatement",
"id": "15288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:49.377+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:44.644 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:44.644 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:44.644 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SnGXMX75sb45ZjwN"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15288/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15288/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:44.644 [print] {
"resourceType": "MedicationStatement",
"id": "15288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:49.377+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:44.644 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:45.262 [print] {
"resourceType": "MedicationStatement",
"id": "15288",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:49.377+02:00",
"source": "#SnGXMX75sb45ZjwN",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:45.932 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:46.512 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:50.663+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:50.663+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:46.512 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:47.098 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:47.098 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aXlikzSLhHPr7HNF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15289/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15289/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:47.098 [print] {
"resourceType": "MedicationStatement",
"id": "15289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:51.825+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:47.098 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:47.098 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:47.098 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aXlikzSLhHPr7HNF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15289/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15289/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:47.098 [print] {
"resourceType": "MedicationStatement",
"id": "15289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:51.825+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:47.098 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:47.660 [print] {
"resourceType": "MedicationStatement",
"id": "15289",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:51.825+02:00",
"source": "#aXlikzSLhHPr7HNF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:48.239 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:48.862 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:52.971+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:52.971+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:48.862 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:49.463 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:49.463 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A0s6kgNM9PZVnqWc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15290/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15290/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:49.463 [print] {
"resourceType": "MedicationStatement",
"id": "15290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:54.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:49.463 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:49.463 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:49.463 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"A0s6kgNM9PZVnqWc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15290/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15290/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:49.463 [print] {
"resourceType": "MedicationStatement",
"id": "15290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:54.187+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:49.463 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:50.048 [print] {
"resourceType": "MedicationStatement",
"id": "15290",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:54.187+02:00",
"source": "#A0s6kgNM9PZVnqWc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:50.665 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:51.251 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:55.402+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:55.402+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:51.251 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:51.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:51.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X6EfvzzppenAf6Jf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15291/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15291/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:51.831 [print] {
"resourceType": "MedicationStatement",
"id": "15291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:56.566+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:51.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:51.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:51.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"X6EfvzzppenAf6Jf"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15291/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15291/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:51.831 [print] {
"resourceType": "MedicationStatement",
"id": "15291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:56.566+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:51.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:52.436 [print] {
"resourceType": "MedicationStatement",
"id": "15291",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:56.566+02:00",
"source": "#X6EfvzzppenAf6Jf",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:53.007 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:53.577 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:43:57.744+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:43:57.744+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:53.577 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:54.153 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:54.153 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W55WtOcXUei5EYpi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15292/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15292/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:54.153 [print] {
"resourceType": "MedicationStatement",
"id": "15292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:58.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:54.153 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:54.159 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:54.159 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W55WtOcXUei5EYpi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15292/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:43:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15292/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:43:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:54.159 [print] {
"resourceType": "MedicationStatement",
"id": "15292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:58.878+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:54.159 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:54.738 [print] {
"resourceType": "MedicationStatement",
"id": "15292",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:43:58.878+02:00",
"source": "#W55WtOcXUei5EYpi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:55.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:55.902 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:00.053+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:00.053+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:55.903 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:56.529 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:56.529 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"avRaYjo9k5BRJeOF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15293/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15293/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:56.529 [print] {
"resourceType": "MedicationStatement",
"id": "15293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:01.261+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:56.529 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:56.529 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:56.529 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"avRaYjo9k5BRJeOF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15293/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15293/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:56.529 [print] {
"resourceType": "MedicationStatement",
"id": "15293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:01.261+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:56.529 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:57.115 [print] {
"resourceType": "MedicationStatement",
"id": "15293",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:01.261+02:00",
"source": "#avRaYjo9k5BRJeOF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:43:57.706 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:43:58.710 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:02.438+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:02.438+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:43:58.710 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:59.296 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:59.296 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bcm5gFlaxzyAIRC7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15294/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15294/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:59.296 [print] {
"resourceType": "MedicationStatement",
"id": "15294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:04.025+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:59.296 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:43:59.296 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:43:59.296 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Bcm5gFlaxzyAIRC7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15294/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15294/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:43:59.303 [print] {
"resourceType": "MedicationStatement",
"id": "15294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:04.025+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:43:59.303 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:43:59.868 [print] {
"resourceType": "MedicationStatement",
"id": "15294",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:04.025+02:00",
"source": "#Bcm5gFlaxzyAIRC7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:00.454 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:01.070 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:05.193+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:05.193+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:01.070 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:01.644 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:01.644 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9097SfX3USfVqSAT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15295/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15295/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:01.644 [print] {
"resourceType": "MedicationStatement",
"id": "15295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:06.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:01.644 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:01.644 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:01.644 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9097SfX3USfVqSAT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15295/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15295/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:01.644 [print] {
"resourceType": "MedicationStatement",
"id": "15295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:06.371+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:01.644 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:02.230 [print] {
"resourceType": "MedicationStatement",
"id": "15295",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:06.371+02:00",
"source": "#9097SfX3USfVqSAT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:02.815 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:03.379 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:07.551+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:07.551+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:03.379 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:03.985 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:03.985 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yEVIkKZNWrCcSUPQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15296/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15296/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:03.985 [print] {
"resourceType": "MedicationStatement",
"id": "15296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:08.719+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:03.985 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:03.985 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:03.985 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yEVIkKZNWrCcSUPQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15296/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15296/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:03.985 [print] {
"resourceType": "MedicationStatement",
"id": "15296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:08.719+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:03.985 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:04.610 [print] {
"resourceType": "MedicationStatement",
"id": "15296",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:08.719+02:00",
"source": "#yEVIkKZNWrCcSUPQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:05.243 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:05.876 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:09.975+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:09.975+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:05.876 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:06.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:06.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6cDCGkRKHBd438CD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15297/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15297/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:06.546 [print] {
"resourceType": "MedicationStatement",
"id": "15297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:11.233+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:06.546 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:06.546 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:06.546 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6cDCGkRKHBd438CD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15297/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15297/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:06.546 [print] {
"resourceType": "MedicationStatement",
"id": "15297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:11.233+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:06.546 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:07.195 [print] {
"resourceType": "MedicationStatement",
"id": "15297",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:11.233+02:00",
"source": "#6cDCGkRKHBd438CD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:07.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:08.413 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:12.545+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:12.545+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:08.413 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:09.043 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:09.043 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3nyjtcoKIyEmSaEE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15298/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15298/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:09.043 [print] {
"resourceType": "MedicationStatement",
"id": "15298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:13.779+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:09.043 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:09.043 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:09.043 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3nyjtcoKIyEmSaEE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15298/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15298/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:09.043 [print] {
"resourceType": "MedicationStatement",
"id": "15298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:13.779+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:09.043 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:09.692 [print] {
"resourceType": "MedicationStatement",
"id": "15298",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:13.779+02:00",
"source": "#3nyjtcoKIyEmSaEE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:10.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:10.972 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:15.057+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:15.057+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:10.972 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:11.539 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:11.539 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BZxsIUTTZgl4iYNk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15299/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15299/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:11.539 [print] {
"resourceType": "MedicationStatement",
"id": "15299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:16.273+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:11.539 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:11.539 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:11.539 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BZxsIUTTZgl4iYNk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15299/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15299/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:11.539 [print] {
"resourceType": "MedicationStatement",
"id": "15299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:16.273+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:11.539 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:12.128 [print] {
"resourceType": "MedicationStatement",
"id": "15299",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:16.273+02:00",
"source": "#BZxsIUTTZgl4iYNk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:12.715 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:13.286 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:17.456+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:17.456+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:13.301 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:13.918 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:13.918 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Pl6BJAUnbuF4DFa5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15300/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15300/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:13.918 [print] {
"resourceType": "MedicationStatement",
"id": "15300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:18.653+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:13.918 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:13.918 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:13.918 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Pl6BJAUnbuF4DFa5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15300/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15300/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:13.918 [print] {
"resourceType": "MedicationStatement",
"id": "15300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:18.653+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:13.918 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:14.555 [print] {
"resourceType": "MedicationStatement",
"id": "15300",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:18.653+02:00",
"source": "#Pl6BJAUnbuF4DFa5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:15.199 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:15.817 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:19.932+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:19.932+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:15.817 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:16.425 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:16.425 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ERNlzAN9cFOLKIJ7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15301/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15301/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:16.425 [print] {
"resourceType": "MedicationStatement",
"id": "15301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:21.163+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:16.425 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:16.425 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:16.425 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ERNlzAN9cFOLKIJ7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15301/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15301/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:16.425 [print] {
"resourceType": "MedicationStatement",
"id": "15301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:21.163+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:16.425 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:17.029 [print] {
"resourceType": "MedicationStatement",
"id": "15301",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:21.163+02:00",
"source": "#ERNlzAN9cFOLKIJ7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:17.628 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:18.200 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:22.362+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:22.362+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:18.200 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:18.825 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:18.825 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ereGvTFH4sIBhnPL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15302/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15302/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:18.825 [print] {
"resourceType": "MedicationStatement",
"id": "15302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:23.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:18.825 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:18.825 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:18.825 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ereGvTFH4sIBhnPL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15302/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15302/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:18.825 [print] {
"resourceType": "MedicationStatement",
"id": "15302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:23.565+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:18.825 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:19.442 [print] {
"resourceType": "MedicationStatement",
"id": "15302",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:23.565+02:00",
"source": "#ereGvTFH4sIBhnPL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:20.059 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:21.688 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:24.792+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:24.792+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:21.688 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:22.328 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:22.328 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5EKK6XOF21j8EKw6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15303/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15303/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:22.328 [print] {
"resourceType": "MedicationStatement",
"id": "15303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:27.060+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:22.328 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:22.328 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:22.328 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5EKK6XOF21j8EKw6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15303/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15303/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:22.328 [print] {
"resourceType": "MedicationStatement",
"id": "15303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:27.060+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:22.328 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:22.929 [print] {
"resourceType": "MedicationStatement",
"id": "15303",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:27.060+02:00",
"source": "#5EKK6XOF21j8EKw6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:23.547 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:24.179 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:28.286+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:28.286+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:24.179 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:24.766 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:24.766 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DovpeFpf3x9UpoOg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15304/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15304/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:24.766 [print] {
"resourceType": "MedicationStatement",
"id": "15304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:29.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:24.766 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:24.766 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:24.766 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DovpeFpf3x9UpoOg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15304/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15304/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:24.766 [print] {
"resourceType": "MedicationStatement",
"id": "15304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:29.501+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:24.766 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:25.368 [print] {
"resourceType": "MedicationStatement",
"id": "15304",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:29.501+02:00",
"source": "#DovpeFpf3x9UpoOg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:25.938 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:26.502 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:30.676+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:30.676+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:26.502 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:27.072 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:27.088 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"joMyS5TKv4BuJzbV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15305/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15305/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:27.088 [print] {
"resourceType": "MedicationStatement",
"id": "15305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:31.818+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:27.088 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:27.088 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:27.088 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"joMyS5TKv4BuJzbV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15305/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15305/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:27.088 [print] {
"resourceType": "MedicationStatement",
"id": "15305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:31.818+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:27.088 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:27.678 [print] {
"resourceType": "MedicationStatement",
"id": "15305",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:31.818+02:00",
"source": "#joMyS5TKv4BuJzbV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:28.270 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:28.856 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:33.002+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:33.002+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:28.856 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:29.495 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:29.495 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bog1T4e8gVI7DMHp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15306/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15306/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:29.495 [print] {
"resourceType": "MedicationStatement",
"id": "15306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:34.215+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:29.495 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:29.495 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:29.495 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bog1T4e8gVI7DMHp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15306/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15306/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:29.495 [print] {
"resourceType": "MedicationStatement",
"id": "15306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:34.215+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:29.495 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:30.097 [print] {
"resourceType": "MedicationStatement",
"id": "15306",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:34.215+02:00",
"source": "#bog1T4e8gVI7DMHp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:31.725 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 25ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 25ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:32.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:36.441+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:36.441+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:32.630 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:33.208 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:33.208 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jP79a4hRTebwH1IO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15307/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15307/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:33.208 [print] {
"resourceType": "MedicationStatement",
"id": "15307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:37.947+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:33.208 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:33.208 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:33.208 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jP79a4hRTebwH1IO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15307/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15307/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:33.208 [print] {
"resourceType": "MedicationStatement",
"id": "15307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:37.947+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:33.208 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:33.829 [print] {
"resourceType": "MedicationStatement",
"id": "15307",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:37.947+02:00",
"source": "#jP79a4hRTebwH1IO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:34.513 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:35.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:39.244+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:39.244+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:35.083 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:35.706 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:35.706 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Zu84if3CVNpqwwjz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15308/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15308/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:35.706 [print] {
"resourceType": "MedicationStatement",
"id": "15308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:40.432+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:35.706 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:35.706 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:35.706 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Zu84if3CVNpqwwjz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15308/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15308/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:35.706 [print] {
"resourceType": "MedicationStatement",
"id": "15308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:40.432+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:35.706 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:36.307 [print] {
"resourceType": "MedicationStatement",
"id": "15308",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:40.432+02:00",
"source": "#Zu84if3CVNpqwwjz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:36.877 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:37.465 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:41.620+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:41.620+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:37.465 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:38.040 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:38.040 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"120ZckB9bHDiILwQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15309/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15309/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:38.040 [print] {
"resourceType": "MedicationStatement",
"id": "15309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:42.775+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:38.040 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:38.040 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:38.040 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"120ZckB9bHDiILwQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15309/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15309/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:38.040 [print] {
"resourceType": "MedicationStatement",
"id": "15309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:42.775+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:38.040 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:38.620 [print] {
"resourceType": "MedicationStatement",
"id": "15309",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:42.775+02:00",
"source": "#120ZckB9bHDiILwQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:39.248 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:40.118 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:43.973+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:43.973+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:40.118 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:41.037 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:41.037 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KVLnUJlr0bjZ5Tci"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15310/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15310/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:41.037 [print] {
"resourceType": "MedicationStatement",
"id": "15310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:45.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:41.037 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:41.037 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:41.037 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KVLnUJlr0bjZ5Tci"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15310/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15310/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:45 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:41.037 [print] {
"resourceType": "MedicationStatement",
"id": "15310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:45.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:41.037 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:41.611 [print] {
"resourceType": "MedicationStatement",
"id": "15310",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:45.761+02:00",
"source": "#KVLnUJlr0bjZ5Tci",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:42.205 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 13ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 13ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:43.174 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:46.945+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:46.945+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:43.174 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:44.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:44.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eAw4LtlmQjrJWJ55"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15311/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15311/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:44.760 [print] {
"resourceType": "MedicationStatement",
"id": "15311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:49.497+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:44.760 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:44.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:44.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eAw4LtlmQjrJWJ55"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15311/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15311/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:44.760 [print] {
"resourceType": "MedicationStatement",
"id": "15311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:49.497+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:44.760 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:45.362 [print] {
"resourceType": "MedicationStatement",
"id": "15311",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:49.497+02:00",
"source": "#eAw4LtlmQjrJWJ55",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:46.071 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 18ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 18ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:46.690 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:50.798+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:50.798+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:46.705 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:47.328 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:47.328 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qOHb4SODm4gyOlsF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15312/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15312/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:47.328 [print] {
"resourceType": "MedicationStatement",
"id": "15312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:52.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:47.328 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:47.328 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:47.328 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qOHb4SODm4gyOlsF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15312/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15312/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:47.328 [print] {
"resourceType": "MedicationStatement",
"id": "15312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:52.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:47.343 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:47.945 [print] {
"resourceType": "MedicationStatement",
"id": "15312",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:52.066+02:00",
"source": "#qOHb4SODm4gyOlsF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:48.563 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:49.195 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:53.296+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:53.296+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:49.195 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:49.867 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:49.867 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7hVa3kDlnW8vXfTP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15313/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15313/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:49.867 [print] {
"resourceType": "MedicationStatement",
"id": "15313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:54.597+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:49.867 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:49.867 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:49.867 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7hVa3kDlnW8vXfTP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15313/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15313/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:49.867 [print] {
"resourceType": "MedicationStatement",
"id": "15313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:54.597+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:49.867 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:50.472 [print] {
"resourceType": "MedicationStatement",
"id": "15313",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:54.597+02:00",
"source": "#7hVa3kDlnW8vXfTP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:51.089 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:51.725 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:55.827+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:55.827+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:51.725 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:52.319 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:52.319 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VXsWceZkDIrh6kcj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15314/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15314/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:52.319 [print] {
"resourceType": "MedicationStatement",
"id": "15314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:57.054+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:52.319 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:52.319 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:52.319 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VXsWceZkDIrh6kcj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15314/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:44:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15314/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:52.319 [print] {
"resourceType": "MedicationStatement",
"id": "15314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:57.054+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:52.319 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:52.889 [print] {
"resourceType": "MedicationStatement",
"id": "15314",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:44:57.054+02:00",
"source": "#VXsWceZkDIrh6kcj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:53.525 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:55.110 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:44:58.269+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:44:58.269+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:55.110 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:55.712 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:55.712 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZzQhWSJxzcLJcLAH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15315/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15315/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:55.712 [print] {
"resourceType": "MedicationStatement",
"id": "15315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:00.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:55.712 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:55.712 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:55.712 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZzQhWSJxzcLJcLAH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15315/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15315/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:44:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:55.712 [print] {
"resourceType": "MedicationStatement",
"id": "15315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:00.441+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:55.712 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:56.349 [print] {
"resourceType": "MedicationStatement",
"id": "15315",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:00.441+02:00",
"source": "#ZzQhWSJxzcLJcLAH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:44:56.923 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:44:57.501 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:01.664+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:01.664+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:44:57.501 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:58.102 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:58.102 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4rsyrdpd3nF2zejx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15316/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15316/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:58.102 [print] {
"resourceType": "MedicationStatement",
"id": "15316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:02.835+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:58.102 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:44:58.102 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:44:58.102 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4rsyrdpd3nF2zejx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15316/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15316/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:44:58.102 [print] {
"resourceType": "MedicationStatement",
"id": "15316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:02.835+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:44:58.102 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:44:59.707 [print] {
"resourceType": "MedicationStatement",
"id": "15316",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:02.835+02:00",
"source": "#4rsyrdpd3nF2zejx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:00.340 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:00.962 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:05.075+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:05.075+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:00.962 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:01.573 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:01.573 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mv6jgNq5jsPmxRYc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15317/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15317/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:01.573 [print] {
"resourceType": "MedicationStatement",
"id": "15317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:06.316+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:01.573 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:01.573 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:01.573 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mv6jgNq5jsPmxRYc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15317/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15317/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:01.573 [print] {
"resourceType": "MedicationStatement",
"id": "15317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:06.316+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:01.573 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:02.379 [print] {
"resourceType": "MedicationStatement",
"id": "15317",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:06.316+02:00",
"source": "#mv6jgNq5jsPmxRYc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:03.019 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:04.034 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:07.753+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:07.753+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:04.035 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:04.653 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:04.653 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WleG19JjsW4lAcJC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15318/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15318/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:04.653 [print] {
"resourceType": "MedicationStatement",
"id": "15318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:09.380+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:04.653 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:04.655 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:04.655 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WleG19JjsW4lAcJC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15318/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15318/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:04.655 [print] {
"resourceType": "MedicationStatement",
"id": "15318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:09.380+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:04.655 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:05.254 [print] {
"resourceType": "MedicationStatement",
"id": "15318",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:09.380+02:00",
"source": "#WleG19JjsW4lAcJC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:05.886 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:06.493 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:10.613+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:10.613+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:06.494 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:07.123 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:07.123 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vW7DCzsE60k42Hsk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15319/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15319/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:07.123 [print] {
"resourceType": "MedicationStatement",
"id": "15319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:11.853+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:07.123 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:07.123 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:07.123 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vW7DCzsE60k42Hsk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15319/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15319/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:07.123 [print] {
"resourceType": "MedicationStatement",
"id": "15319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:11.853+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:07.123 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:08.107 [print] {
"resourceType": "MedicationStatement",
"id": "15319",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:11.853+02:00",
"source": "#vW7DCzsE60k42Hsk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:08.684 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:09.297 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:13.417+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:13.417+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:09.298 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:09.984 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:09.984 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F10miF4DBr5lT4rL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15320/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15320/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:09.984 [print] {
"resourceType": "MedicationStatement",
"id": "15320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:14.717+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:09.984 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:09.985 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:09.985 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F10miF4DBr5lT4rL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15320/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15320/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:09.985 [print] {
"resourceType": "MedicationStatement",
"id": "15320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:14.717+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:09.985 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:10.557 [print] {
"resourceType": "MedicationStatement",
"id": "15320",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:14.717+02:00",
"source": "#F10miF4DBr5lT4rL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:11.177 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:11.763 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:15.908+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:15.908+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:11.763 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:12.382 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:12.382 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CG1pGtn1FWMgHdHD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15321/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15321/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:12.382 [print] {
"resourceType": "MedicationStatement",
"id": "15321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:17.114+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:12.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:12.384 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:12.384 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CG1pGtn1FWMgHdHD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15321/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15321/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:12.384 [print] {
"resourceType": "MedicationStatement",
"id": "15321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:17.114+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:12.384 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:12.983 [print] {
"resourceType": "MedicationStatement",
"id": "15321",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:17.114+02:00",
"source": "#CG1pGtn1FWMgHdHD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:13.593 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:14.174 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:18.323+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:18.323+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:14.176 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:14.801 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:14.801 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kzzRPQtaPvybMqCL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15322/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15322/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:14.801 [print] {
"resourceType": "MedicationStatement",
"id": "15322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:19.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:14.801 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:14.801 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:14.801 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kzzRPQtaPvybMqCL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15322/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15322/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:14.801 [print] {
"resourceType": "MedicationStatement",
"id": "15322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:19.527+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:14.801 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:15.623 [print] {
"resourceType": "MedicationStatement",
"id": "15322",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:19.527+02:00",
"source": "#kzzRPQtaPvybMqCL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:16.207 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:16.827 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:20.945+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:20.945+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:16.827 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:17.621 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:17.621 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aYPwwvOki6sCzc9G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15323/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15323/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:17.621 [print] {
"resourceType": "MedicationStatement",
"id": "15323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:22.355+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:17.621 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:17.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:17.623 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aYPwwvOki6sCzc9G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15323/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15323/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:17.623 [print] {
"resourceType": "MedicationStatement",
"id": "15323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:22.355+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:17.623 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:18.232 [print] {
"resourceType": "MedicationStatement",
"id": "15323",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:22.355+02:00",
"source": "#aYPwwvOki6sCzc9G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:18.863 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:19.425 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:23.581+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:23.581+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:19.425 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:20.042 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:20.042 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hH7XCVVHxDutFJNu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15324/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15324/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:20.042 [print] {
"resourceType": "MedicationStatement",
"id": "15324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:24.780+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:20.042 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:20.042 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:20.042 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hH7XCVVHxDutFJNu"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15324/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15324/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:20.042 [print] {
"resourceType": "MedicationStatement",
"id": "15324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:24.780+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:20.042 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:20.657 [print] {
"resourceType": "MedicationStatement",
"id": "15324",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:24.780+02:00",
"source": "#hH7XCVVHxDutFJNu",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:21.241 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 12ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 12ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:21.838 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:25.972+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:25.972+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:21.839 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:22.414 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:22.414 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8t3p6Y7u5hKh2Y7p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15325/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15325/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:22.414 [print] {
"resourceType": "MedicationStatement",
"id": "15325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:27.145+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:22.414 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:22.416 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:22.416 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8t3p6Y7u5hKh2Y7p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15325/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15325/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:22.416 [print] {
"resourceType": "MedicationStatement",
"id": "15325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:27.145+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:22.416 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:22.994 [print] {
"resourceType": "MedicationStatement",
"id": "15325",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:27.145+02:00",
"source": "#8t3p6Y7u5hKh2Y7p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:23.604 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:24.222 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:28.340+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:28.340+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:24.224 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:24.819 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:24.819 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QDhIdUlq2imbhQOV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15326/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15326/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:24.819 [print] {
"resourceType": "MedicationStatement",
"id": "15326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:29.552+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:24.819 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:24.821 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:24.821 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QDhIdUlq2imbhQOV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15326/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15326/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:24.821 [print] {
"resourceType": "MedicationStatement",
"id": "15326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:29.552+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:24.821 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:25.422 [print] {
"resourceType": "MedicationStatement",
"id": "15326",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:29.552+02:00",
"source": "#QDhIdUlq2imbhQOV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:26.018 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:26.573 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:30.751+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:30.751+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:26.573 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:27.197 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:27.197 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"avEloPc4ujsReeZU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15327/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15327/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:27.197 [print] {
"resourceType": "MedicationStatement",
"id": "15327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:31.929+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:27.197 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:27.198 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:27.198 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"avEloPc4ujsReeZU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15327/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15327/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:27.198 [print] {
"resourceType": "MedicationStatement",
"id": "15327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:31.929+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:27.198 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:27.756 [print] {
"resourceType": "MedicationStatement",
"id": "15327",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:31.929+02:00",
"source": "#avEloPc4ujsReeZU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:28.384 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:28.963 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:33.117+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:33.117+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:28.964 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:29.587 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:29.587 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LBdnpsntHcjCgPB8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15328/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15328/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:29.587 [print] {
"resourceType": "MedicationStatement",
"id": "15328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:34.318+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:29.587 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:29.587 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:29.587 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LBdnpsntHcjCgPB8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15328/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15328/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:29.587 [print] {
"resourceType": "MedicationStatement",
"id": "15328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:34.318+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:29.587 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:30.219 [print] {
"resourceType": "MedicationStatement",
"id": "15328",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:34.318+02:00",
"source": "#LBdnpsntHcjCgPB8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:30.889 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:31.479 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:35.601+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:35.601+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:31.479 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:32.056 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:32.056 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kE9frlW8GCI8adoz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15329/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15329/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:32.056 [print] {
"resourceType": "MedicationStatement",
"id": "15329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:36.796+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:32.056 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:32.056 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:32.056 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kE9frlW8GCI8adoz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15329/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15329/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:32.056 [print] {
"resourceType": "MedicationStatement",
"id": "15329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:36.796+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:32.056 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:32.722 [print] {
"resourceType": "MedicationStatement",
"id": "15329",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:36.796+02:00",
"source": "#kE9frlW8GCI8adoz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:33.591 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:34.203 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:38.328+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:38.328+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:34.203 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:35.122 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:35.122 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"flOcUO0Skymp140C"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15330/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15330/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:35.122 [print] {
"resourceType": "MedicationStatement",
"id": "15330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:39.847+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:35.122 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:35.122 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:35.122 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"flOcUO0Skymp140C"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15330/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15330/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:35.122 [print] {
"resourceType": "MedicationStatement",
"id": "15330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:39.847+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:35.122 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:35.701 [print] {
"resourceType": "MedicationStatement",
"id": "15330",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:39.847+02:00",
"source": "#flOcUO0Skymp140C",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:37.305 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:38.128 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:42.035+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:42.035+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:38.128 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:38.731 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:38.731 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1EfTSaYBLa8JkVis"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15331/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15331/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:38.731 [print] {
"resourceType": "MedicationStatement",
"id": "15331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:43.473+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:38.731 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:38.731 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:38.731 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1EfTSaYBLa8JkVis"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15331/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15331/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:38.731 [print] {
"resourceType": "MedicationStatement",
"id": "15331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:43.473+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:38.731 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:39.323 [print] {
"resourceType": "MedicationStatement",
"id": "15331",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:43.473+02:00",
"source": "#1EfTSaYBLa8JkVis",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:39.939 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:41.525 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:44.667+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:44.667+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:41.526 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:42.167 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:42.167 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OyCNTSh1ic4kbktv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15332/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15332/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:42.167 [print] {
"resourceType": "MedicationStatement",
"id": "15332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:46.884+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:42.167 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:42.167 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:42.167 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OyCNTSh1ic4kbktv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15332/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15332/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:42.167 [print] {
"resourceType": "MedicationStatement",
"id": "15332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:46.884+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:42.167 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:42.731 [print] {
"resourceType": "MedicationStatement",
"id": "15332",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:46.884+02:00",
"source": "#OyCNTSh1ic4kbktv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:43.317 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:44.221 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:48.058+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:48.058+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:44.221 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:45.138 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:45.138 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mHVrXYvlzrO5pKxj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15333/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15333/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:45.138 [print] {
"resourceType": "MedicationStatement",
"id": "15333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:49.871+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:45.138 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:45.138 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:45.138 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mHVrXYvlzrO5pKxj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15333/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15333/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:45.138 [print] {
"resourceType": "MedicationStatement",
"id": "15333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:49.871+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:45.138 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:45.770 [print] {
"resourceType": "MedicationStatement",
"id": "15333",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:49.871+02:00",
"source": "#mHVrXYvlzrO5pKxj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:46.407 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:46.987 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:51.141+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:51.141+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:46.988 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:47.595 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:47.595 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wiof2eTYNfHtnUf6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15334/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15334/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:47.595 [print] {
"resourceType": "MedicationStatement",
"id": "15334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:52.330+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:47.595 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:47.597 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:47.597 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wiof2eTYNfHtnUf6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15334/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15334/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:47.597 [print] {
"resourceType": "MedicationStatement",
"id": "15334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:52.330+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:47.597 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:48.187 [print] {
"resourceType": "MedicationStatement",
"id": "15334",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:52.330+02:00",
"source": "#wiof2eTYNfHtnUf6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:48.803 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:49.409 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:53.533+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:53.533+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:49.409 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:50.057 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:50.057 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RWtXJCVgAzag12Pn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15335/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15335/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:50.057 [print] {
"resourceType": "MedicationStatement",
"id": "15335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:54.795+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:50.057 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:50.057 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:50.057 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RWtXJCVgAzag12Pn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15335/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15335/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:50.057 [print] {
"resourceType": "MedicationStatement",
"id": "15335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:54.795+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:50.057 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:50.654 [print] {
"resourceType": "MedicationStatement",
"id": "15335",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:54.795+02:00",
"source": "#RWtXJCVgAzag12Pn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:51.506 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:52.102 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:56.237+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:56.237+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:52.102 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:52.713 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:52.713 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FNgxpQE4lJ2vN3sx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15336/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15336/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:52.713 [print] {
"resourceType": "MedicationStatement",
"id": "15336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:57.449+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:52.713 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:52.715 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:52.715 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FNgxpQE4lJ2vN3sx"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15336/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:45:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15336/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:45:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:52.715 [print] {
"resourceType": "MedicationStatement",
"id": "15336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:57.449+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:52.715 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:53.326 [print] {
"resourceType": "MedicationStatement",
"id": "15336",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:45:57.449+02:00",
"source": "#FNgxpQE4lJ2vN3sx",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:53.913 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:55.714 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:45:58.655+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:45:58.655+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:55.715 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:56.404 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:56.404 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bnjkWd2rzrUMqvbr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15337/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15337/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:56.404 [print] {
"resourceType": "MedicationStatement",
"id": "15337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:01.142+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:56.404 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:56.404 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:56.404 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bnjkWd2rzrUMqvbr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15337/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15337/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:56.404 [print] {
"resourceType": "MedicationStatement",
"id": "15337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:01.142+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:56.404 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:45:57.903 [print] {
"resourceType": "MedicationStatement",
"id": "15337",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:01.142+02:00",
"source": "#bnjkWd2rzrUMqvbr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:45:58.548 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:45:59.120 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:03.271+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:03.271+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:45:59.120 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:59.749 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:59.750 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EgvMlbDHGjgQ98hH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15338/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15338/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:59.750 [print] {
"resourceType": "MedicationStatement",
"id": "15338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:04.482+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:59.750 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:45:59.751 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:45:59.751 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EgvMlbDHGjgQ98hH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15338/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15338/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:45:59.751 [print] {
"resourceType": "MedicationStatement",
"id": "15338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:04.482+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:45:59.751 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:00.381 [print] {
"resourceType": "MedicationStatement",
"id": "15338",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:04.482+02:00",
"source": "#EgvMlbDHGjgQ98hH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:00.978 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:01.597 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:05.702+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:05.702+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:01.598 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:03.787 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:03.787 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"corNk1S7vMa4aIm2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15339/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15339/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:03.787 [print] {
"resourceType": "MedicationStatement",
"id": "15339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:08.522+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:03.787 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:03.789 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:03.789 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"corNk1S7vMa4aIm2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15339/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15339/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:03.789 [print] {
"resourceType": "MedicationStatement",
"id": "15339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:08.522+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:03.789 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:05.405 [print] {
"resourceType": "MedicationStatement",
"id": "15339",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:08.522+02:00",
"source": "#corNk1S7vMa4aIm2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:06.001 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:06.603 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:10.747+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:10.747+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:06.604 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:07.267 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:07.267 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HTimNZJhTlLMO3U3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15340/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15340/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:07.267 [print] {
"resourceType": "MedicationStatement",
"id": "15340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:11.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:07.267 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:07.268 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:07.268 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HTimNZJhTlLMO3U3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15340/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15340/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:07.268 [print] {
"resourceType": "MedicationStatement",
"id": "15340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:11.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:07.268 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:07.840 [print] {
"resourceType": "MedicationStatement",
"id": "15340",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:11.960+02:00",
"source": "#HTimNZJhTlLMO3U3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:09.327 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:09.952 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:14.055+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:14.055+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:09.954 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:10.588 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:10.588 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qc60CicboshuPt0w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15341/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15341/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:10.588 [print] {
"resourceType": "MedicationStatement",
"id": "15341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:15.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:10.588 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:10.588 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:10.588 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Qc60CicboshuPt0w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15341/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15341/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:10.588 [print] {
"resourceType": "MedicationStatement",
"id": "15341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:15.322+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:10.588 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:11.184 [print] {
"resourceType": "MedicationStatement",
"id": "15341",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:15.322+02:00",
"source": "#Qc60CicboshuPt0w",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:11.810 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:12.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:16.533+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:16.533+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:12.448 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:13.067 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:13.067 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yOSMBEGscqkqLq0L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15342/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15342/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:13.067 [print] {
"resourceType": "MedicationStatement",
"id": "15342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:17.763+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:13.067 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:13.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:13.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yOSMBEGscqkqLq0L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15342/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15342/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:13.069 [print] {
"resourceType": "MedicationStatement",
"id": "15342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:17.763+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:13.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:13.916 [print] {
"resourceType": "MedicationStatement",
"id": "15342",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:17.763+02:00",
"source": "#yOSMBEGscqkqLq0L",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:15.550 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:16.148 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:20.290+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:20.290+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:16.148 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:17.766 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:17.766 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"28IZpQk51d82fnDt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15343/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15343/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:17.766 [print] {
"resourceType": "MedicationStatement",
"id": "15343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:22.487+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:17.766 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:17.766 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:17.768 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"28IZpQk51d82fnDt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15343/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15343/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:17.768 [print] {
"resourceType": "MedicationStatement",
"id": "15343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:22.487+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:17.768 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:18.338 [print] {
"resourceType": "MedicationStatement",
"id": "15343",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:22.487+02:00",
"source": "#28IZpQk51d82fnDt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:18.901 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:19.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:23.648+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:23.648+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:19.508 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:20.735 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:20.735 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uFYAmTfsOqyWYvy7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15344/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15344/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:20.735 [print] {
"resourceType": "MedicationStatement",
"id": "15344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:24.921+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:20.735 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:20.735 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:20.735 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uFYAmTfsOqyWYvy7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15344/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15344/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:20.735 [print] {
"resourceType": "MedicationStatement",
"id": "15344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:24.921+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:20.735 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:21.356 [print] {
"resourceType": "MedicationStatement",
"id": "15344",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:24.921+02:00",
"source": "#uFYAmTfsOqyWYvy7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:21.973 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:22.813 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:26.701+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:26.701+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:22.814 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:23.426 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:23.426 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MqHeX8IHgslqUHSY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15345/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15345/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:23.426 [print] {
"resourceType": "MedicationStatement",
"id": "15345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:28.161+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:23.426 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:23.428 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:23.428 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MqHeX8IHgslqUHSY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15345/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15345/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:23.428 [print] {
"resourceType": "MedicationStatement",
"id": "15345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:28.161+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:23.428 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:24.013 [print] {
"resourceType": "MedicationStatement",
"id": "15345",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:28.161+02:00",
"source": "#MqHeX8IHgslqUHSY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:24.659 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:25.254 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:29.381+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:29.381+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:25.254 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:26.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:26.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pqFMNknUSdDyclOC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15346/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15346/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:26.146 [print] {
"resourceType": "MedicationStatement",
"id": "15346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:30.627+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:26.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:26.146 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:26.146 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pqFMNknUSdDyclOC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15346/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15346/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:26.146 [print] {
"resourceType": "MedicationStatement",
"id": "15346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:30.627+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:26.146 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:26.785 [print] {
"resourceType": "MedicationStatement",
"id": "15346",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:30.627+02:00",
"source": "#pqFMNknUSdDyclOC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:27.392 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:27.974 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:32.118+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:32.118+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:27.976 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:28.573 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:28.573 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MhXX0Vbqi52Tgq3b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15347/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15347/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:28.573 [print] {
"resourceType": "MedicationStatement",
"id": "15347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:33.288+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:28.573 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:28.575 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:28.575 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MhXX0Vbqi52Tgq3b"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15347/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15347/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:28.575 [print] {
"resourceType": "MedicationStatement",
"id": "15347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:33.288+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:28.575 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:29.145 [print] {
"resourceType": "MedicationStatement",
"id": "15347",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:33.288+02:00",
"source": "#MhXX0Vbqi52Tgq3b",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:29.748 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:30.452 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:34.478+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:34.478+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:30.452 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:31.095 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:31.095 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OFpebMp5bUzIUQYw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15348/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15348/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:31.095 [print] {
"resourceType": "MedicationStatement",
"id": "15348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:35.808+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:31.095 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:31.095 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:31.095 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OFpebMp5bUzIUQYw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15348/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15348/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:31.095 [print] {
"resourceType": "MedicationStatement",
"id": "15348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:35.808+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:31.095 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:31.951 [print] {
"resourceType": "MedicationStatement",
"id": "15348",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:35.808+02:00",
"source": "#OFpebMp5bUzIUQYw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:32.556 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:33.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:37.284+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:37.284+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:33.181 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:33.786 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:33.786 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uEVC25jPv9oWjun3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15349/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15349/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:33.786 [print] {
"resourceType": "MedicationStatement",
"id": "15349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:38.525+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:33.786 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:33.786 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:33.786 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uEVC25jPv9oWjun3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15349/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15349/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:33.786 [print] {
"resourceType": "MedicationStatement",
"id": "15349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:38.525+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:33.786 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:34.366 [print] {
"resourceType": "MedicationStatement",
"id": "15349",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:38.525+02:00",
"source": "#uEVC25jPv9oWjun3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:34.989 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:35.596 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:39.727+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:39.727+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:35.596 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:36.251 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:36.251 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ArDDvJT0infHKf1Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15350/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15350/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:36.251 [print] {
"resourceType": "MedicationStatement",
"id": "15350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:40.987+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:36.251 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:36.251 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:36.251 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ArDDvJT0infHKf1Y"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15350/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15350/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:36.251 [print] {
"resourceType": "MedicationStatement",
"id": "15350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:40.987+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:36.251 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:37.084 [print] {
"resourceType": "MedicationStatement",
"id": "15350",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:40.987+02:00",
"source": "#ArDDvJT0infHKf1Y",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:37.669 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:38.256 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:42.400+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:42.400+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:38.256 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:38.882 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:38.882 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kmD3dAnkdJSe8lVR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15351/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15351/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:38.882 [print] {
"resourceType": "MedicationStatement",
"id": "15351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:43.618+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:38.882 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:38.884 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:38.884 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kmD3dAnkdJSe8lVR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15351/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15351/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:38.884 [print] {
"resourceType": "MedicationStatement",
"id": "15351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:43.618+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:38.884 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:39.836 [print] {
"resourceType": "MedicationStatement",
"id": "15351",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:43.618+02:00",
"source": "#kmD3dAnkdJSe8lVR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:40.793 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:41.383 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:45.527+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:45.527+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:41.383 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:42.100 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:42.100 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dbZGDVqzRMV7rnXA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15352/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15352/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:42.100 [print] {
"resourceType": "MedicationStatement",
"id": "15352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:46.835+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:42.100 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:42.100 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:42.100 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dbZGDVqzRMV7rnXA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15352/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15352/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:42.100 [print] {
"resourceType": "MedicationStatement",
"id": "15352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:46.835+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:42.100 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:42.716 [print] {
"resourceType": "MedicationStatement",
"id": "15352",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:46.835+02:00",
"source": "#dbZGDVqzRMV7rnXA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:43.355 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:43.934 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:48.086+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:48.086+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:43.934 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:44.524 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:44.524 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1zqOW5n3n7HYCExW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15353/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15353/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:44.524 [print] {
"resourceType": "MedicationStatement",
"id": "15353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:49.264+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:44.524 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:44.524 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:44.524 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1zqOW5n3n7HYCExW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15353/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15353/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:44.524 [print] {
"resourceType": "MedicationStatement",
"id": "15353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:49.264+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:44.524 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:45.146 [print] {
"resourceType": "MedicationStatement",
"id": "15353",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:49.264+02:00",
"source": "#1zqOW5n3n7HYCExW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:45.977 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:46.618 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:50.705+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:50.705+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:46.618 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:47.258 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:47.258 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vKUW7qumlL3n3pW5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15354/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15354/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:47.258 [print] {
"resourceType": "MedicationStatement",
"id": "15354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:52.002+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:47.258 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:47.258 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:47.258 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vKUW7qumlL3n3pW5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15354/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15354/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:47.258 [print] {
"resourceType": "MedicationStatement",
"id": "15354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:52.002+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:47.258 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:47.833 [print] {
"resourceType": "MedicationStatement",
"id": "15354",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:52.002+02:00",
"source": "#vKUW7qumlL3n3pW5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 7
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:48.802 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:49.392 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:53.471+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:53.471+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:49.393 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:50.003 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:50.003 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z588zQdCfrWzN0jT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15355/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15355/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:50.003 [print] {
"resourceType": "MedicationStatement",
"id": "15355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:54.752+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:50.003 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:50.019 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:50.019 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Z588zQdCfrWzN0jT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15355/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15355/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:50.019 [print] {
"resourceType": "MedicationStatement",
"id": "15355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:54.752+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:50.019 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:50.667 [print] {
"resourceType": "MedicationStatement",
"id": "15355",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:54.752+02:00",
"source": "#Z588zQdCfrWzN0jT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:51.320 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:51.951 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:56.054+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:56.054+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:51.951 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:52.561 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:52.561 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LXfs70zmR6WnAJdG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15356/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15356/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:52.561 [print] {
"resourceType": "MedicationStatement",
"id": "15356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:57.311+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:52.561 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:52.576 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:52.576 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LXfs70zmR6WnAJdG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15356/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:46:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15356/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:52.576 [print] {
"resourceType": "MedicationStatement",
"id": "15356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:57.311+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:52.576 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:53.198 [print] {
"resourceType": "MedicationStatement",
"id": "15356",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:46:57.311+02:00",
"source": "#LXfs70zmR6WnAJdG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:53.824 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 26ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 26ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:55.070 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:46:58.533+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:46:58.533+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:55.070 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:55.715 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:55.715 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8oB0s1vObBQAzIGg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15357/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15357/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:55.715 [print] {
"resourceType": "MedicationStatement",
"id": "15357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:00.440+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:55.715 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:55.715 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:55.715 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8oB0s1vObBQAzIGg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15357/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15357/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:46:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:55.715 [print] {
"resourceType": "MedicationStatement",
"id": "15357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:00.440+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:55.715 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:56.375 [print] {
"resourceType": "MedicationStatement",
"id": "15357",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:00.440+02:00",
"source": "#8oB0s1vObBQAzIGg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:46:58.013 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:46:58.588 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:02.747+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:02.747+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:46:58.588 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:59.221 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:59.221 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iYArzLGeNlHzrSTq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15358/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15358/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:59.222 [print] {
"resourceType": "MedicationStatement",
"id": "15358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:03.950+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:59.222 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:46:59.223 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:46:59.223 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iYArzLGeNlHzrSTq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15358/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15358/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:46:59.223 [print] {
"resourceType": "MedicationStatement",
"id": "15358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:03.950+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:46:59.223 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:46:59.818 [print] {
"resourceType": "MedicationStatement",
"id": "15358",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:03.950+02:00",
"source": "#iYArzLGeNlHzrSTq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:01.471 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:02.095 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:06.221+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:06.221+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:02.095 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:02.699 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:02.699 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DSI2YagMwGxZPIqS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15359/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15359/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:02.699 [print] {
"resourceType": "MedicationStatement",
"id": "15359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:07.431+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:02.699 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:02.700 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:02.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DSI2YagMwGxZPIqS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15359/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15359/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:02.701 [print] {
"resourceType": "MedicationStatement",
"id": "15359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:07.431+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:02.701 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:03.308 [print] {
"resourceType": "MedicationStatement",
"id": "15359",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:07.431+02:00",
"source": "#DSI2YagMwGxZPIqS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 2
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:04.188 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:04.811 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:08.937+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:08.937+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:04.812 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:05.397 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:05.397 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"laiIBDR4qSCREqOe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15360/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15360/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:05.397 [print] {
"resourceType": "MedicationStatement",
"id": "15360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:10.127+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:05.397 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:05.398 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:05.398 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"laiIBDR4qSCREqOe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15360/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15360/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:05.399 [print] {
"resourceType": "MedicationStatement",
"id": "15360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:10.127+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:05.399 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:05.977 [print] {
"resourceType": "MedicationStatement",
"id": "15360",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:10.127+02:00",
"source": "#laiIBDR4qSCREqOe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:06.581 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:07.202 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:11.327+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:11.327+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:07.202 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:07.799 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:07.799 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PfbFwg7cz4Bab8jc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15361/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15361/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:07.799 [print] {
"resourceType": "MedicationStatement",
"id": "15361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:12.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:07.799 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:07.799 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:07.799 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PfbFwg7cz4Bab8jc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15361/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15361/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:07.799 [print] {
"resourceType": "MedicationStatement",
"id": "15361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:12.517+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:07.799 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:08.398 [print] {
"resourceType": "MedicationStatement",
"id": "15361",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:12.517+02:00",
"source": "#PfbFwg7cz4Bab8jc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 18
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:09.000 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:09.621 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:13.734+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:13.734+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:09.621 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:10.271 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:10.271 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7r0GpGHccKlg6r5E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15362/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15362/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:10.271 [print] {
"resourceType": "MedicationStatement",
"id": "15362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:14.984+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:10.271 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:10.271 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:10.271 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7r0GpGHccKlg6r5E"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15362/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15362/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:10.271 [print] {
"resourceType": "MedicationStatement",
"id": "15362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:14.984+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:10.271 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:10.902 [print] {
"resourceType": "MedicationStatement",
"id": "15362",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:14.984+02:00",
"source": "#7r0GpGHccKlg6r5E",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 4
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:11.482 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:12.084 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:16.228+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:16.228+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:12.084 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:12.669 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:12.669 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VmTrWAm2qP7bNOrI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15363/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15363/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:12.669 [print] {
"resourceType": "MedicationStatement",
"id": "15363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:17.415+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:12.669 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:12.684 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:12.684 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VmTrWAm2qP7bNOrI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15363/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15363/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:12.684 [print] {
"resourceType": "MedicationStatement",
"id": "15363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:17.415+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:12.684 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:13.289 [print] {
"resourceType": "MedicationStatement",
"id": "15363",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:17.415+02:00",
"source": "#VmTrWAm2qP7bNOrI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:13.893 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:14.484 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:18.632+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:18.632+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:14.484 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:15.085 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:15.085 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fTZhl15SBLX9dQWe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15364/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15364/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:15.085 [print] {
"resourceType": "MedicationStatement",
"id": "15364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:19.817+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:15.085 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:15.085 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:15.085 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fTZhl15SBLX9dQWe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15364/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15364/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:15.085 [print] {
"resourceType": "MedicationStatement",
"id": "15364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:19.817+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:15.085 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:15.685 [print] {
"resourceType": "MedicationStatement",
"id": "15364",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:19.817+02:00",
"source": "#fTZhl15SBLX9dQWe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:16.358 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:16.934 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:21.101+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:21.101+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:16.934 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:17.532 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:17.532 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ShQG4eQfv6TG9Lby"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15365/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15365/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:17.532 [print] {
"resourceType": "MedicationStatement",
"id": "15365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:22.274+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:17.532 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:17.532 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:17.532 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ShQG4eQfv6TG9Lby"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15365/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15365/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:17.532 [print] {
"resourceType": "MedicationStatement",
"id": "15365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:22.274+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:17.532 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:18.117 [print] {
"resourceType": "MedicationStatement",
"id": "15365",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:22.274+02:00",
"source": "#ShQG4eQfv6TG9Lby",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 21
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:18.738 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:20.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:23.466+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:23.466+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:20.468 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:21.093 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:21.093 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"roQNaxDRi85XHuBc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15366/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15366/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:21.093 [print] {
"resourceType": "MedicationStatement",
"id": "15366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:25.837+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:21.093 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:21.108 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:21.108 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"roQNaxDRi85XHuBc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15366/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15366/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:21.108 [print] {
"resourceType": "MedicationStatement",
"id": "15366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:25.837+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:21.108 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:21.717 [print] {
"resourceType": "MedicationStatement",
"id": "15366",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:25.837+02:00",
"source": "#roQNaxDRi85XHuBc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:22.366 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:22.967 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:27.109+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:27.109+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:22.967 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:23.590 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:23.590 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ndafrybrnorF2EP3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15367/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15367/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:23.590 [print] {
"resourceType": "MedicationStatement",
"id": "15367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:28.314+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:23.590 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:23.591 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:23.591 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ndafrybrnorF2EP3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15367/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15367/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:23.591 [print] {
"resourceType": "MedicationStatement",
"id": "15367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:28.314+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:23.592 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:24.469 [print] {
"resourceType": "MedicationStatement",
"id": "15367",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:28.314+02:00",
"source": "#ndafrybrnorF2EP3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:25.101 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:25.903 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:29.842+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:29.842+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:25.903 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:26.551 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:26.551 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uFurB7N1k1tft9HG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15368/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15368/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:26.551 [print] {
"resourceType": "MedicationStatement",
"id": "15368",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:31.285+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:26.551 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:26.551 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:26.551 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uFurB7N1k1tft9HG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15368/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15368/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:26.551 [print] {
"resourceType": "MedicationStatement",
"id": "15368",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:31.285+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:26.551 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:27.183 [print] {
"resourceType": "MedicationStatement",
"id": "15368",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:31.285+02:00",
"source": "#uFurB7N1k1tft9HG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:27.840 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:28.452 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:32.566+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:32.566+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:28.452 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:29.054 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:29.054 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PBhBXrxsqEwz9wIy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15369/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15369/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:29.054 [print] {
"resourceType": "MedicationStatement",
"id": "15369",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:33.793+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:29.054 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:29.054 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:29.054 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PBhBXrxsqEwz9wIy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15369/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15369/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:29.054 [print] {
"resourceType": "MedicationStatement",
"id": "15369",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:33.793+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:29.054 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:29.661 [print] {
"resourceType": "MedicationStatement",
"id": "15369",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:33.793+02:00",
"source": "#PBhBXrxsqEwz9wIy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:30.269 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:30.919 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:35.019+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:35.019+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:30.922 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:31.560 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:31.560 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"msxp1gUbSVCiB5pe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15370/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15370/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:31.560 [print] {
"resourceType": "MedicationStatement",
"id": "15370",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:36.291+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:31.560 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:31.562 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:31.562 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"msxp1gUbSVCiB5pe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15370/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15370/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:31.562 [print] {
"resourceType": "MedicationStatement",
"id": "15370",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:36.291+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:31.562 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:32.149 [print] {
"resourceType": "MedicationStatement",
"id": "15370",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:36.291+02:00",
"source": "#msxp1gUbSVCiB5pe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:33.449 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:34.038 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:38.181+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:38.181+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:34.038 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:34.618 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:34.618 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NQgUBJa9e0CtMaVS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15371/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15371/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:34.618 [print] {
"resourceType": "MedicationStatement",
"id": "15371",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:39.360+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:34.618 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:34.618 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"528"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:34.618 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NQgUBJa9e0CtMaVS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15371/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15371/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:34.618 [print] {
"resourceType": "MedicationStatement",
"id": "15371",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:39.360+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:34.618 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:35.291 [print] {
"resourceType": "MedicationStatement",
"id": "15371",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:39.360+02:00",
"source": "#NQgUBJa9e0CtMaVS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 5
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:35.938 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:36.612 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:40.676+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:40.676+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:36.612 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:37.265 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:37.265 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n9yZ2wmgIk7zunpR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15372/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15372/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:37.265 [print] {
"resourceType": "MedicationStatement",
"id": "15372",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:42.005+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:37.265 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:37.265 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:37.265 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"n9yZ2wmgIk7zunpR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15372/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15372/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:37.265 [print] {
"resourceType": "MedicationStatement",
"id": "15372",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:42.005+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:37.265 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:37.915 [print] {
"resourceType": "MedicationStatement",
"id": "15372",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:42.005+02:00",
"source": "#n9yZ2wmgIk7zunpR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:38.535 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:39.136 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:43.278+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:43.278+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:39.136 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:39.721 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:39.721 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ppmAcpjTBzyTgNzk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15373/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15373/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:39.721 [print] {
"resourceType": "MedicationStatement",
"id": "15373",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:44.461+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:39.721 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:39.736 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:39.736 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ppmAcpjTBzyTgNzk"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15373/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15373/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:39.736 [print] {
"resourceType": "MedicationStatement",
"id": "15373",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:44.461+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:39.736 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:40.358 [print] {
"resourceType": "MedicationStatement",
"id": "15373",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:44.461+02:00",
"source": "#ppmAcpjTBzyTgNzk",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:40.992 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:41.631 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:45.718+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:45.718+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:41.632 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:42.274 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:42.274 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jceZBQZcYAbuaHIE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15374/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15374/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:42.274 [print] {
"resourceType": "MedicationStatement",
"id": "15374",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:47.024+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:42.274 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:42.274 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:42.274 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jceZBQZcYAbuaHIE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15374/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15374/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:42.274 [print] {
"resourceType": "MedicationStatement",
"id": "15374",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:47.024+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:42.274 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:42.878 [print] {
"resourceType": "MedicationStatement",
"id": "15374",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:47.024+02:00",
"source": "#jceZBQZcYAbuaHIE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 16
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:43.492 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:44.099 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:48.238+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:48.238+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:44.114 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:44.756 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:44.756 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PeIA3Awhprq4BxU5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15375/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15375/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:44.756 [print] {
"resourceType": "MedicationStatement",
"id": "15375",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:49.470+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:44.756 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:44.756 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:44.756 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PeIA3Awhprq4BxU5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15375/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15375/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:44.756 [print] {
"resourceType": "MedicationStatement",
"id": "15375",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:49.470+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:44.756 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:45.352 [print] {
"resourceType": "MedicationStatement",
"id": "15375",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:49.470+02:00",
"source": "#PeIA3Awhprq4BxU5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 10
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:46.099 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:46.700 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:50.827+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:50.827+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:46.700 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:47.616 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:47.616 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mWGeVKVJ9C2gE6u3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15376/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15376/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:47.616 [print] {
"resourceType": "MedicationStatement",
"id": "15376",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:52.356+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:47.616 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:47.616 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:47.616 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"mWGeVKVJ9C2gE6u3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15376/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15376/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:47.616 [print] {
"resourceType": "MedicationStatement",
"id": "15376",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:52.356+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:47.616 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:48.237 [print] {
"resourceType": "MedicationStatement",
"id": "15376",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:52.356+02:00",
"source": "#mWGeVKVJ9C2gE6u3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:48.881 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:49.464 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:53.610+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:53.610+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:49.464 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:50.049 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:50.049 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FQeFlqBPdTg4N0SX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15377/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15377/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:50.049 [print] {
"resourceType": "MedicationStatement",
"id": "15377",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:54.797+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:50.049 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:50.049 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:50.049 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FQeFlqBPdTg4N0SX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15377/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15377/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:50.049 [print] {
"resourceType": "MedicationStatement",
"id": "15377",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:54.797+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:50.049 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:50.670 [print] {
"resourceType": "MedicationStatement",
"id": "15377",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:54.797+02:00",
"source": "#FQeFlqBPdTg4N0SX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 12
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:51.323 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:52.163 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:56.062+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:56.062+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:52.178 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:52.767 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:52.767 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vgdtyLBPHoTieOjn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15378/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15378/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:52.767 [print] {
"resourceType": "MedicationStatement",
"id": "15378",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:57.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:52.767 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:52.769 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:52.769 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vgdtyLBPHoTieOjn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15378/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15378/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:52.769 [print] {
"resourceType": "MedicationStatement",
"id": "15378",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:57.505+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:52.769 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:53.320 [print] {
"resourceType": "MedicationStatement",
"id": "15378",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:57.505+02:00",
"source": "#vgdtyLBPHoTieOjn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:53.909 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:54.489 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:47:58.645+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:47:58.645+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:54.490 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:55.117 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:55.117 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PWWcY9w9yRnnN61q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15379/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15379/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:55.117 [print] {
"resourceType": "MedicationStatement",
"id": "15379",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:59.855+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:55.117 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:55.123 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:55.123 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PWWcY9w9yRnnN61q"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15379/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:47:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15379/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:47:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:55.123 [print] {
"resourceType": "MedicationStatement",
"id": "15379",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:59.855+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:55.123 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:56.000 [print] {
"resourceType": "MedicationStatement",
"id": "15379",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:47:59.855+02:00",
"source": "#PWWcY9w9yRnnN61q",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:56.903 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:47:57.567 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:01.632+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:01.632+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:47:57.567 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:58.149 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:58.149 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"osnAyUCB4XeDAD3x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15380/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15380/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:58.149 [print] {
"resourceType": "MedicationStatement",
"id": "15380",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:02.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:58.149 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:47:58.165 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:47:58.165 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"osnAyUCB4XeDAD3x"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15380/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:02 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15380/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:47:58.165 [print] {
"resourceType": "MedicationStatement",
"id": "15380",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:02.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:47:58.165 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:47:58.839 [print] {
"resourceType": "MedicationStatement",
"id": "15380",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:02.879+02:00",
"source": "#osnAyUCB4XeDAD3x",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 15
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:47:59.432 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:00.033 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:04.170+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:04.170+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:00.033 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:00.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:00.623 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CfSLkjprxQADQPuT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15381/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15381/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:00.623 [print] {
"resourceType": "MedicationStatement",
"id": "15381",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:05.362+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:00.623 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:00.623 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:00.623 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CfSLkjprxQADQPuT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15381/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15381/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:00.623 [print] {
"resourceType": "MedicationStatement",
"id": "15381",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:05.362+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:00.623 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:01.246 [print] {
"resourceType": "MedicationStatement",
"id": "15381",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:05.362+02:00",
"source": "#CfSLkjprxQADQPuT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:01.913 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:02.494 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:06.642+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:06.642+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:02.495 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:03.075 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:03.075 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"154mXx4rZCbFpcBH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15382/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15382/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:03.075 [print] {
"resourceType": "MedicationStatement",
"id": "15382",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:07.813+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:03.075 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:03.076 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:03.076 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"154mXx4rZCbFpcBH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15382/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15382/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:03.076 [print] {
"resourceType": "MedicationStatement",
"id": "15382",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:07.813+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:03.076 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:03.657 [print] {
"resourceType": "MedicationStatement",
"id": "15382",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:07.813+02:00",
"source": "#154mXx4rZCbFpcBH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:04.292 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:04.876 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:09.029+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:09.029+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:04.877 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:05.486 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:05.486 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oJATRLDkjfQZnWjq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15383/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15383/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:05.486 [print] {
"resourceType": "MedicationStatement",
"id": "15383",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:10.220+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:05.486 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:05.488 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:05.488 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"oJATRLDkjfQZnWjq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15383/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15383/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:05.488 [print] {
"resourceType": "MedicationStatement",
"id": "15383",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:10.220+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:05.488 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:06.079 [print] {
"resourceType": "MedicationStatement",
"id": "15383",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:10.220+02:00",
"source": "#oJATRLDkjfQZnWjq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:06.666 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:07.298 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:11.412+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:11.412+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:07.313 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:07.921 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:07.921 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5X5LAvfcNSTCy1Rw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15384/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15384/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:07.921 [print] {
"resourceType": "MedicationStatement",
"id": "15384",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:12.667+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:07.921 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:07.921 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:07.921 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5X5LAvfcNSTCy1Rw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15384/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15384/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:07.921 [print] {
"resourceType": "MedicationStatement",
"id": "15384",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:12.667+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:07.921 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:08.523 [print] {
"resourceType": "MedicationStatement",
"id": "15384",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:12.667+02:00",
"source": "#5X5LAvfcNSTCy1Rw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:09.141 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:10.774 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:13.884+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:13.884+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:10.775 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:11.792 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:11.792 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v6C1qsqws2MGofLn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15385/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15385/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:11.792 [print] {
"resourceType": "MedicationStatement",
"id": "15385",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:16.316+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:11.792 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:11.794 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:11.794 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"v6C1qsqws2MGofLn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15385/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15385/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:11.794 [print] {
"resourceType": "MedicationStatement",
"id": "15385",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:16.316+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:11.794 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:12.414 [print] {
"resourceType": "MedicationStatement",
"id": "15385",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:16.316+02:00",
"source": "#v6C1qsqws2MGofLn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:13.030 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:13.653 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:17.770+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:17.770+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:13.655 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:14.289 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:14.289 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tlIZI5DEZca1DKhs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15386/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15386/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:14.289 [print] {
"resourceType": "MedicationStatement",
"id": "15386",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:18.976+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:14.289 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:14.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:14.290 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tlIZI5DEZca1DKhs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15386/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15386/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:14.290 [print] {
"resourceType": "MedicationStatement",
"id": "15386",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:18.976+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:14.290 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:14.897 [print] {
"resourceType": "MedicationStatement",
"id": "15386",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:18.976+02:00",
"source": "#tlIZI5DEZca1DKhs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 9
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:15.519 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:17.134 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:20.260+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:20.260+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:17.134 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:17.706 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:17.706 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EFOLt18Ux2l9BHSH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15387/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15387/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:17.706 [print] {
"resourceType": "MedicationStatement",
"id": "15387",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:22.447+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:17.706 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:17.706 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:17.706 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EFOLt18Ux2l9BHSH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15387/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15387/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:17.706 [print] {
"resourceType": "MedicationStatement",
"id": "15387",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:22.447+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:17.706 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:18.275 [print] {
"resourceType": "MedicationStatement",
"id": "15387",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:22.447+02:00",
"source": "#EFOLt18Ux2l9BHSH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:18.882 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:19.500 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:23.596+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:23.596+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:19.500 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:20.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:20.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KEtoUFzN11C8MafP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15388/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15388/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:20.069 [print] {
"resourceType": "MedicationStatement",
"id": "15388",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:24.809+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:20.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:20.069 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:20.069 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KEtoUFzN11C8MafP"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15388/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15388/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:20.069 [print] {
"resourceType": "MedicationStatement",
"id": "15388",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:24.809+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:20.069 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:20.671 [print] {
"resourceType": "MedicationStatement",
"id": "15388",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:24.809+02:00",
"source": "#KEtoUFzN11C8MafP",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:21.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:21.862 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:25.996+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:25.996+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:21.862 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:22.522 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:22.522 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VWf8UkeNUc78RqUa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15389/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15389/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:22.522 [print] {
"resourceType": "MedicationStatement",
"id": "15389",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:27.257+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:22.522 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:22.523 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:22.523 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VWf8UkeNUc78RqUa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15389/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15389/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:22.523 [print] {
"resourceType": "MedicationStatement",
"id": "15389",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:27.257+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:22.523 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:23.135 [print] {
"resourceType": "MedicationStatement",
"id": "15389",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:27.257+02:00",
"source": "#VWf8UkeNUc78RqUa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:23.732 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:24.393 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:28.480+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:28.480+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:24.393 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:25.068 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:25.068 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W4dLlES4sMFxI361"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15390/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15390/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:25.068 [print] {
"resourceType": "MedicationStatement",
"id": "15390",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:29.808+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:25.068 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:25.068 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:25.068 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W4dLlES4sMFxI361"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15390/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15390/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:25.068 [print] {
"resourceType": "MedicationStatement",
"id": "15390",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:29.808+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:25.068 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:25.643 [print] {
"resourceType": "MedicationStatement",
"id": "15390",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:29.808+02:00",
"source": "#W4dLlES4sMFxI361",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 6
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:27.235 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:27.882 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:31.980+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:31.980+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:27.882 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:28.467 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:28.467 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AbwEaAL6nynidArV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15391/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15391/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:28.467 [print] {
"resourceType": "MedicationStatement",
"id": "15391",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:33.215+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:28.467 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:28.467 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"689"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:28.467 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AbwEaAL6nynidArV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15391/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15391/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:28.467 [print] {
"resourceType": "MedicationStatement",
"id": "15391",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:33.215+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:28.467 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:29.100 [print] {
"resourceType": "MedicationStatement",
"id": "15391",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:33.215+02:00",
"source": "#AbwEaAL6nynidArV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 8
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:29.671 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:30.249 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:34.419+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:34.419+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:30.249 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:31.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:31.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lV2XgG6bmxXK4lQw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15392/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15392/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:31.113 [print] {
"resourceType": "MedicationStatement",
"id": "15392",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:35.827+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:31.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:31.113 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:31.113 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lV2XgG6bmxXK4lQw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15392/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15392/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:31.113 [print] {
"resourceType": "MedicationStatement",
"id": "15392",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:35.827+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:31.113 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:31.722 [print] {
"resourceType": "MedicationStatement",
"id": "15392",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:35.827+02:00",
"source": "#lV2XgG6bmxXK4lQw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 3
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:32.351 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:33.967 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:37.080+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:37.080+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:33.967 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:34.552 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:34.552 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PkqiLk3qp7kN1knK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15393/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15393/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:34.552 [print] {
"resourceType": "MedicationStatement",
"id": "15393",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:39.288+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:34.552 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:34.552 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"609"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:34.552 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PkqiLk3qp7kN1knK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15393/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15393/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:34.552 [print] {
"resourceType": "MedicationStatement",
"id": "15393",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:39.288+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:34.552 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:35.130 [print] {
"resourceType": "MedicationStatement",
"id": "15393",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:39.288+02:00",
"source": "#PkqiLk3qp7kN1knK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:35.731 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:36.364 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:40.473+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:40.473+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:36.364 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:37.163 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:37.163 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TvlaQN8LUWyFPgox"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15394/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15394/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:37.163 [print] {
"resourceType": "MedicationStatement",
"id": "15394",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:41.890+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:37.163 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:37.163 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:37.163 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TvlaQN8LUWyFPgox"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15394/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15394/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:37.163 [print] {
"resourceType": "MedicationStatement",
"id": "15394",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:41.890+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:37.163 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:37.767 [print] {
"resourceType": "MedicationStatement",
"id": "15394",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:41.890+02:00",
"source": "#TvlaQN8LUWyFPgox",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 19
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:38.364 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:38.955 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:43.097+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:43.097+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:38.956 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:39.603 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:39.603 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XCbkAVXAhGju7hcm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15395/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15395/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:39.603 [print] {
"resourceType": "MedicationStatement",
"id": "15395",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:44.327+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:39.603 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:39.603 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:39.603 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XCbkAVXAhGju7hcm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15395/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15395/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:39.603 [print] {
"resourceType": "MedicationStatement",
"id": "15395",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:44.327+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:39.603 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:40.218 [print] {
"resourceType": "MedicationStatement",
"id": "15395",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:44.327+02:00",
"source": "#XCbkAVXAhGju7hcm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 23
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:40.850 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:41.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:45.594+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:45.594+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:41.508 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:42.121 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:42.121 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qAGcdvwgIlzuz0uc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15396/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15396/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:42.121 [print] {
"resourceType": "MedicationStatement",
"id": "15396",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:46.853+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:42.121 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:42.122 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:42.122 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qAGcdvwgIlzuz0uc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15396/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15396/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:42.122 [print] {
"resourceType": "MedicationStatement",
"id": "15396",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:46.853+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:42.123 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:42.750 [print] {
"resourceType": "MedicationStatement",
"id": "15396",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:46.853+02:00",
"source": "#qAGcdvwgIlzuz0uc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 1
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:44.363 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:44.933 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:49.094+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:49.094+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:44.933 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:45.528 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:45.528 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p75YV9EQ3FEt2m71"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15397/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15397/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:45.528 [print] {
"resourceType": "MedicationStatement",
"id": "15397",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:50.259+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:45.528 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:45.534 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:45.534 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"p75YV9EQ3FEt2m71"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15397/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15397/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:45.534 [print] {
"resourceType": "MedicationStatement",
"id": "15397",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:50.259+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:45.534 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:46.134 [print] {
"resourceType": "MedicationStatement",
"id": "15397",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:50.259+02:00",
"source": "#p75YV9EQ3FEt2m71",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 13
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:46.722 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:47.299 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:51.458+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:51.458+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:47.299 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:47.913 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:47.913 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9n25EKNuLiIEnemX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15398/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15398/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:47.913 [print] {
"resourceType": "MedicationStatement",
"id": "15398",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:52.655+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:47.913 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:47.913 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:47.913 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9n25EKNuLiIEnemX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15398/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15398/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:47.913 [print] {
"resourceType": "MedicationStatement",
"id": "15398",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:52.655+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:47.913 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:48.484 [print] {
"resourceType": "MedicationStatement",
"id": "15398",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:52.655+02:00",
"source": "#9n25EKNuLiIEnemX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:49.091 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:49.675 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:53.836+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:53.836+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:49.676 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:50.334 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:50.334 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cUJ5RXJjbzB4sPlY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15399/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15399/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:50.334 [print] {
"resourceType": "MedicationStatement",
"id": "15399",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:55.069+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:50.334 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:50.335 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:50.335 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cUJ5RXJjbzB4sPlY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15399/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15399/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:50.335 [print] {
"resourceType": "MedicationStatement",
"id": "15399",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:55.069+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:50.337 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:50.927 [print] {
"resourceType": "MedicationStatement",
"id": "15399",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:55.069+02:00",
"source": "#cUJ5RXJjbzB4sPlY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 17
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:51.513 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:52.365 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:56.251+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:56.251+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:52.367 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:53.992 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:53.992 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dBiI270PiYPRYBcF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15400/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15400/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:53.992 [print] {
"resourceType": "MedicationStatement",
"id": "15400",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:58.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:53.992 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:53.997 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:53.997 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dBiI270PiYPRYBcF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15400/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:48:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15400/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:48:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:53.997 [print] {
"resourceType": "MedicationStatement",
"id": "15400",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:58.731+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:53.997 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:54.617 [print] {
"resourceType": "MedicationStatement",
"id": "15400",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:48:58.731+02:00",
"source": "#dBiI270PiYPRYBcF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:55.234 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:55.845 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:48:59.971+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:48:59.971+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:55.846 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:56.537 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:56.537 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VAPHSQm8e5oRWApX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15401/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15401/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:56.537 [print] {
"resourceType": "MedicationStatement",
"id": "15401",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:01.258+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:56.537 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:56.538 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:56.538 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VAPHSQm8e5oRWApX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15401/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15401/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:56.538 [print] {
"resourceType": "MedicationStatement",
"id": "15401",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:01.258+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:56.538 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:57.220 [print] {
"resourceType": "MedicationStatement",
"id": "15401",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:01.258+02:00",
"source": "#VAPHSQm8e5oRWApX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 24
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:48:57.788 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:48:58.381 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:49:02.528+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:49:02.528+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:48:58.382 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:59.009 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:59.009 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZsqQQ4N9dHKreqtG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15402/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15402/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:59.009 [print] {
"resourceType": "MedicationStatement",
"id": "15402",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:03.744+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:59.009 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:48:59.011 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:48:59.011 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZsqQQ4N9dHKreqtG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15402/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15402/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:48:59.011 [print] {
"resourceType": "MedicationStatement",
"id": "15402",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:03.744+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:48:59.011 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:48:59.655 [print] {
"resourceType": "MedicationStatement",
"id": "15402",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:03.744+02:00",
"source": "#ZsqQQ4N9dHKreqtG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:49:00.289 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:49:00.887 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:49:05.019+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:49:05.019+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:49:00.889 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:49:01.513 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:49:01.513 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h6tirFvJBIJ57m1c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15403/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15403/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:49:01.513 [print] {
"resourceType": "MedicationStatement",
"id": "15403",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:06.244+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:49:01.513 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:49:01.514 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"530"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:49:01.514 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h6tirFvJBIJ57m1c"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15403/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15403/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:49:01.514 [print] {
"resourceType": "MedicationStatement",
"id": "15403",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:06.244+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:49:01.514 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:49:02.141 [print] {
"resourceType": "MedicationStatement",
"id": "15403",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:06.244+02:00",
"source": "#h6tirFvJBIJ57m1c",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 14
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:49:02.774 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:49:03.387 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:49:07.509+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:49:07.509+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:49:03.387 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:49:03.967 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:49:03.967 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MzqbcIhitPbbtDIL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15404/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15404/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:49:03.967 [print] {
"resourceType": "MedicationStatement",
"id": "15404",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:08.716+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:49:03.967 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:49:03.967 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"610"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:49:03.967 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MzqbcIhitPbbtDIL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15404/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15404/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:49:03.967 [print] {
"resourceType": "MedicationStatement",
"id": "15404",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:08.716+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:49:03.967 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:49:04.553 [print] {
"resourceType": "MedicationStatement",
"id": "15404",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:08.716+02:00",
"source": "#MzqbcIhitPbbtDIL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:49:05.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:49:05.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:49:09.882+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:49:09.882+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:49:05.787 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:49:06.815 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:49:06.815 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dLU5YybruC9YEIRR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15405/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15405/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:49:06.815 [print] {
"resourceType": "MedicationStatement",
"id": "15405",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:11.549+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:49:06.816 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:49:06.817 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"690"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:49:06.817 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dLU5YybruC9YEIRR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15405/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15405/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:49:06.818 [print] {
"resourceType": "MedicationStatement",
"id": "15405",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:11.549+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:49:06.818 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:49:07.429 [print] {
"resourceType": "MedicationStatement",
"id": "15405",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:11.549+02:00",
"source": "#dLU5YybruC9YEIRR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "L01BA01",
"display": "Metotrexato"
},
{
"system": "http://www.whocc.no/atc",
"code": "L01BC01",
"display": "Citarabina"
},
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 22
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:49:08.016 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:49:08.614 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:49:12.758+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:49:12.758+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:49:08.616 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:49:09.196 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:49:09.196 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wLE3YH3vzAj58SUT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15406/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15406/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:49:09.196 [print] {
"resourceType": "MedicationStatement",
"id": "15406",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:13.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:49:09.196 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:49:09.197 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:49:09.197 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wLE3YH3vzAj58SUT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15406/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15406/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:49:09.197 [print] {
"resourceType": "MedicationStatement",
"id": "15406",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:13.937+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:49:09.197 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:49:09.808 [print] {
"resourceType": "MedicationStatement",
"id": "15406",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:13.937+02:00",
"source": "#wLE3YH3vzAj58SUT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 11
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:49:10.377 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:49:10.992 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:49:15.119+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:49:15.119+02:00"
}
]
}
@Delete
@Post
@Get
@MedicationStatement
@Only-api
Scenario Outline: The hospital sends a FHIR MedicationStatement resource.
Given
path '/MedicationStatement'
And
print resource
10:49:10.993 [print] {
"resourceType": "MedicationStatement",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:49:11.821 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:49:11.821 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9Tm6wcRDCjnxv3Q5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15407/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15407/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:49:11.821 [print] {
"resourceType": "MedicationStatement",
"id": "15407",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:16.554+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:49:11.821 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
10:49:11.823 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"529"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
10:49:11.823 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9Tm6wcRDCjnxv3Q5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15407/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 08:49:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/MedicationStatement/15407/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 08:49:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
10:49:11.823 [print] {
"resourceType": "MedicationStatement",
"id": "15407",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:16.554+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
> *
print COOKIES
10:49:11.823 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
10:49:12.431 [print] {
"resourceType": "MedicationStatement",
"id": "15407",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T10:49:16.554+02:00",
"source": "#9Tm6wcRDCjnxv3Q5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/MedicationStatement-eu-pcsp"
]
},
"language": "ES",
"medicationCodeableConcept": {
"coding": [
{
"system": "http://www.whocc.no/atc",
"code": "H02AB07",
"display": "Prednisona"
}
]
},
"dosage": [
{
"timing": {
"repeat": {
"count": 20
}
},
"route": {
"coding": [
{
"system": "https://standardterms.edqm.eu",
"code": "20042000",
"display": "Uso Intratecal"
}
]
}
}
]
}
When
print 'They try to delete the MedicationStatement resource from the server'
And
method DELETE
Then
status 200
And
print response
10:49:13.232 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the MedicationStatement resource is on the server'
And
method GET
Then
status 410
And
print response
10:49:14.050 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T10:49:17.987+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T10:49:17.987+02:00"
}
]
}